
24 Sep
2007
24 Sep
'07
9:22 p.m.
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