
yeahh, I know that it is similar, but don't know how to start implementing it. -------- Original-Nachricht --------
Datum: Tue, 26 Jan 2010 11:05:20 +0000 Von: Stephen Tetley
An: CC: Beginners@haskell.org Betreff: Re: [Haskell-beginners] foldr for Nats
Hi
One hint is that your data type for natural numbers is remarkably like the data type for lists...
data List a = [] | a : List a
The difference is that List has an element of type 'a' at the non-zero cases.
Best wishes
Stephen _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
-- Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 - sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser