[Haskell-cafe] Thompson's Exercise 9.13

Cale Gibbard cgibbard at gmail.com
Sat Apr 16 23:51:21 EDT 2005


> 
> Oh. I haven't learned how to handle infinite data structures yet, but
> is init defined for infinite lists in the first place?
> 
> --
> Kaoru Hosokawa
> khosokawa at gmail.com
> 

Yes it is, try "init [1..]" in ghci or hugs. It just happens to be the
identity function on infinite lists, because of course there is no
last element to remove.

 - Cale


More information about the Haskell-Cafe mailing list