Hello,

thanks a lot for the expeditious replies to my trifling question. Here is 
another one:

Can you tell me why the following does not function? I mean the last part for 
converting number into the new data type. If this is not a quick fix, please 
ignore it. As an utter beginner, I cannot estimate the significance of my 
questions.




data Nat = Zero | Succ Nat

natToInt Zero = 0
natToInt (Succ n) = (natToInt n) + 1

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





Thank you very much.
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
_______________________________________________
Hugs-Users mailing list
Hugs-Users@haskell.org
http://www.haskell.org/mailman/listinfo/hugs-users

Reply via email to