<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thanks everyone,<br><br>Hmm...I hadn't thought about it that way, but w/r/t Haskell you're absolutely right.<br><br>People have said that Haskell is good to learn because it makes one think differently about programming, and they're right. <br><br>Michael<br><br>--- On <b>Wed, 10/21/09, Neal Alexander <i>&lt;relapse.dev@gmx.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Neal Alexander &lt;relapse.dev@gmx.com&gt;<br>Subject: [Haskell-cafe] Re: Simple but interesting (for me) problem<br>To: haskell-cafe@haskell.org<br>Date: Wednesday, October 21, 2009, 2:34 PM<br><br><div class="plainMail">michael rice wrote:<br>&gt; 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?<br>&gt; <br>&gt; Michael<br>&gt; <br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br><br>I think its more in the spirit of things things to have a function that produces an infinite list of values.<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a
 href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></blockquote></td></tr></table><br>