michael rice wrote:
> There's a thread on the plt-scheme list about creating a function of NO arguments named NEXT that just returns the number of times it's been called, a piece of
cake in Scheme, but how would one do this in Haskell? Would the best approach be to use a State monad?
>
> Michael
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Haskell-Cafe mailing list
>
Haskell-Cafe@haskell.org>
http://www.haskell.org/mailman/listinfo/haskell-cafeI think its more in the spirit of things things to have a function that produces an infinite list of values.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe