
21 Dec
2009
21 Dec
'09
1:40 p.m.
your type is data Nat = S Nat | Z and not data Nat = 1 + Nat | 0 On Mon, 2009-12-21 at 18:27 +0100, kane96@gmx.de wrote:
-------- Original-Nachricht --------
Datum: Mon, 21 Dec 2009 15:06:38 +0100 Von: Daniel Fischer
An: beginners@haskell.org CC: kane96@gmx.de Betreff: Re: [Haskell-beginners] Enum for natural numbers Am Montag 21 Dezember 2009 15:02:16 schrieb kane96@gmx.de:
In another task I should create an infinite list: allNats :: [Nat] I would have done it in a recursion but there issn't a parameter to call allNats with
Prelude> :t iterate iterate :: (a -> a) -> a -> [a]
this works: allNats = (iterate (1+) 1) but it doesn't match my declaration: allNats :: [Nat]