Re: natural numbers
"Neil Mitchell" <[email protected]> Thu, 3 Aug 2006 21:24:03 +0100
| Newsgroups | gmane.comp.lang.haskell.hugs.user |
|---|---|
| Message-ID | <[email protected]> |
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