One half of all Haskell coders will tell you that mutable state
isn't a
good starting point to learn Haskell, the other half will tell you the
same because they want to be cool kids, too.
And the one left over will point out that he asked how to do this the
FP way, not the imperative way?
If it was me btw, I'd take a stab at the problem being that each time
we do something a time gets updated and we want to know how much time
has passed since we last did "something".
I'd approach this by generating a lazy list of times at which we
started doing "something", and then generating a lazy list of time
differences.
Bob
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe