Thanks everyone,

Hmm...I hadn't thought about it that way, but w/r/t Haskell you're absolutely 
right.

People have said that Haskell is good to learn because it makes one think 
differently about programming, and they're right. 

Michael

--- On Wed, 10/21/09, Neal Alexander <relapse....@gmx.com> wrote:

From: Neal Alexander <relapse....@gmx.com>
Subject: [Haskell-cafe] Re: Simple but interesting (for me) problem
To: haskell-cafe@haskell.org
Date: Wednesday, October 21, 2009, 2:34 PM

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-cafe

I 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.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



      
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to