To my 

>> By the way, the  List.partition  definition
>>                          \p xs -> (filter p xs, filter (not .p) xs)
>> 
>> is not it the simplest and the best implementation?


Marcin Qrczak Kowalczyk  <[EMAIL PROTECTED]>  replies on 18 Jan 2000 

> It evaluates p twice on each element.


But "filter-filter" implementation needs a constant space for

                    head $ fst $ partition (==1) [0..n].

And some recent implementations take  heap+stack  proportional to  n.


------------------
Sergey Mechveliani
[EMAIL PROTECTED]







Reply via email to