
24 Jun
2006
24 Jun
'06
2:54 p.m.
Stepan Golosunov wrote:
1:_|_ is certainly finite.
And what is length _|_ ?
_|_, of course!! :-)
The point being, length is well-defined only for total lists; it is undefined for partial lists. But this doesn't mean that a partial list isn't finite.
What is "finite list" then? Is ones = 1:ones also finite?
Hmmm... never tried to write all this down in one place before, but I think this covers all cases: A partial list is one that ends in _|_. A total list is one that ends in []. A finite list is either partial or total. Any other list is infinite. So "ones" is infinite. -Paul