A simple function that creates a counter function (with localized mutable state).
Posted: 9 years ago by Tomas Petricek