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