Folks,
I claimed that these are different functions:
> partition1 p xs = (filter p xs, filter (not . p) xs)
> partition2 p = foldr (\x (ys, zs) -> if p x then (x:ys,zs) else (ys,x:zs))
> ([],[])
I was correct, but not for the reason I thought. Nota bene:
partition1 p bottom = (bottom, bottom)
partition2 p bottom = bottom
*Sigh* And the language named in honor of Haskell Curry
for which Currying is not a valid transformation strikes
again!
Cheers,
--Joe
Joseph H. Fasel, Ph.D. email: [EMAIL PROTECTED]
Technology Modeling and Analysis phone: +1 505 667 7158
University of California fax: +1 505 667 2960
Los Alamos National Laboratory postal: TSA-7 MS F609
Los Alamos, NM 87545