
18 May
2009
18 May
'09
11:26 p.m.
On Mon, May 18, 2009 at 9:56 PM, aditya siram
Curiously, the regular 'Data.List.find' function that applies a Boolean predicate to each member of the list also seems to first traverse the entire list using 'filter' and then grabs the head of the result.
Ah! I just thought I'd point out that 'filter' does not necessarily traverse the entire list if all you do with the result is grab the head - it only traverses enough of the list to figure out what the head of the list should be (or even that it exists). Haskell is lazy :-) Antoine