First I am a Haskell newbie. I\'ve read this: Immutable functional objects in highly mutable domain And my question is nearly the same -- how to efficiently write algorithms whe
Creating new immutable objects isn't nearly as expense as you might think, since large amounts of structural sharing can occur because the compiler KNOWS they can't change and thus can be safely shared. That said, using highly imperative algorithms with lots of mutable state in Haskell is a bit of a code smell.