I have simplified the example further:
repeat1 x = x:y:ys
where
y:ys = repeat1 x
repeat2 x = extend (repeat2 x)
where
extend (y:ys) = x:y:ys
repeat3 x = extend (repeat3 x)
where
extend ys = x:ys
Now,
null (repeat1 1)
null (repeat3 1)
terminate while
null (repeat2 1)
does not.
Sebastian
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Feb 02 2011 - 11:42:22 CET