in reply to Re^3: closures: anonymous subs vs function templates?
in thread closures: anonymous subs vs function templates?

I of course did not want to promote function templates for such use cases, but just tried to see how they could work out. I definitely agree that the approach with references to anoonymous subroutines is vastly superior, especially in view of your first remark: a new closure is destroying the previous one.
  • Comment on Re^4: closures: anonymous subs vs function templates?