Writing a counter function

Mark Carroll mark@chaos.x-philes.com
Sat, 29 Jun 2002 17:26:46 -0500 (CDT)


On Sat, 29 Jun 2002, Samuel E. Moelius III wrote:
(snip)
> Here's another not-exactly-what-you-wanted solution.  :)
(snip)

Do any of the experimental extensions to Haskell allow a what-he-wanted
solution? I couldn't arrange one in H98 without something having an
infinitely-recursive type signature. I'm sure it would have been easy in
Lisp, and he already gave a Perl equivalent, so I'm wondering if it could
be at all sane for Haskell to allow such stuff and if Haskell is somehow
keeping us on the straight and narrow by disallowing the exact counter
that was originally requested.

The beauty of his request was that it was so simple and seemed to make
sense; I went ahead and tried to fulfill it before realising I couldn't
do it either.

-- Mark