+ /// The function is somewhat roundabout with the closure argument because internally the
+ /// `MonoHashMap` uses a `RefCell`. When iterating over the `HashMap` inside the `RefCell`,
+ /// we need to keep a borrow to the `HashMap` inside the iterator. The borrow is only alive
+ /// as long as the `Ref` returned by `RefCell::borrow()` is alive. So we can't return the
+ /// iterator, as that would drop the `Ref`. We can't return both, as it's not possible in Rust
+ /// to have a struct/tuple with a field that refers to another field.