by dddbbb · 6y ago · 0 comments
partition p xs = foldr (select p) ([],[]) xs
select p x ~(ts,fs) | p x = (x:ts,fs)
| otherwise = (ts, x:fs)
That is the entirety of `partition` in the standard library.No comments yet.