[Haskell-cafe] using mutable data structures in pure functions