Nested functors: Compiler can't determine type equality

I’ve been following the discussion and I learned a lot of not so obvious things that I think would be useful to a wide audience. It’d be great to have something like a “Functor style guide” or “Best practices” or “How not to shoot yourself in the foot with functors” tutorial somewhere that is a bit more verbose than a manual section but more concise than this thread.