Writing a counter function

Mark Carroll mark@chaos.x-philes.com
Sat, 29 Jun 2002 11:06:13 -0400 (EDT)


On Sat, 29 Jun 2002, Shlomi Fish wrote:
(snip)
> counter n = (n,(counter (n+1)))
(snip)

This doesn't work because you seem to be defining an infinitely deep tuple
(1,(2,(3,(4,(....))))) which is naughty.

I'm not really sure what alternative to suggest beyond [n .. ] without
knowing more about what you are trying to do.

-- Mark