[Haskell-cafe] Re: Simple but interesting (for me) problem

michael rice nowgate at yahoo.com
Wed Oct 21 15:44:39 EDT 2009


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.dev at gmx.com> wrote:

From: Neal Alexander <relapse.dev at gmx.com>
Subject: [Haskell-cafe] Re: Simple but interesting (for me) problem
To: haskell-cafe at 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 at 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 at haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091021/332d11e6/attachment.html


More information about the Haskell-Cafe mailing list