[Hugs-users] natural numbers

Neil Mitchell ndmitchell at gmail.com
Thu Aug 3 16:24:03 EDT 2006


Hi

> number n = case n of
>         0 -> Zero
>         _ -> Succ(number(n-1))

Looks fine to me, what exactly doesn't work? Type error, parse error?
Gives the wrong result? For what values?

You might also get more success if you email haskell-cafe -AT-
haskell.org, which is for general Haskell stuff and gets a lot more
traffic and readers than hugs-users. Either than or the Haskell IRC
channel for instant answers.

Thanks

Neil


More information about the Hugs-Users mailing list