[Haskell-beginners] foldr for Nats
kane96 at gmx.de
kane96 at gmx.de
Mon Feb 1 15:20:48 EST 2010
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 <stephen.tetley at gmail.com>
> An:
> CC: Beginners at 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 at 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
More information about the Beginners
mailing list