[Haskell-cafe] Re: How to do this in FP way?
Thomas Davie
tom.davie at gmail.com
Mon Jun 16 03:42:45 EDT 2008
>
> 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
More information about the Haskell-Cafe
mailing list