I believe &im::HashMap -> im::HashMap should be very cheap, no more expensive than a Rc::clone()
I can’t figure out how to do the above.
Looking at https://docs.rs/im/12.3.3/src/im/hash/map.rs.html#596-600 there are functions which take a &im::HashMap , does an update, and returns a im::HashMap
Now, suppose I want to do a number of these updates in sequence, I’d like to do:
let mut x: im::HashMap<...> = ...; for ... x = x.update(...)
but I can’t do this right now because I can’t figure out how to convert an &im::hashMap to a im::HashMap