variable is an iterator.
to get to the actual element, you have to dereference the iterator using *. or ->
the actual element in a map<K, V> is a struct std::pair<K, V>.
std::pair<K, V> has two data members named "first" and "second" (first is of type K,
second is of type V)
In your above code, V could be a pointer to an object which has a member function named "function".
a->b can be rewritten as *a.b (in most cases). Apply that rule twice: a->b->c can be rewritten
as (*a.b)->c which can be written as *(*a.b).c