Hi > > Pretty much, yes. > > > > So I just need to write > > newtype LazyNatural = LazyNatural [()]
or data Nat = Zero | Succ Nat it's your choice really. > and then add some suitable instances. ;-) Yes. Lots of them. Lots of instances and lots of methods. > Hey, the "length" function would then just be > > ln_length :: [x] -> LazyNatural > ln_length = LazyNatural . map (const ()) > > Ooo, that's hard. Nope, its really easy. Its just quite a bit of work filling in all the instances. I bet you can't do it and upload the results to hackage within 24 hours :-) Thanks Neil _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe