[Haskell-cafe] Re: Functional progr., infinity, and the Universe
paul.hudak at yale.edu
Sat Jun 24 14:54:04 EDT 2006
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
> 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.
More information about the Haskell-Cafe