:: (a -> Bool) -> [a] -> [[a]] package:leancheck

Classify values based on the result of a given function.
> classifyOn head ["sheep", "chip", "ship", "cheap"]
[["sheep","ship"],["chip","cheap"]]
> classifyOn odd [1,2,3,4,5,6]
[[1,3,5],[2,4,6]]
(cf. classify, classifyBy)