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