Export to GitHub

functionaljava - issue #6

sortBy and comparing


Posted on May 23, 2009 by Quick Rabbit

Add sortBy to sequential types like Stream and List. Its type is (a -> a -> Ordering) -> [a] -> [a].

Add Ord.comparing of type (Ord a) => (b -> a) -> b -> b

Bonus points: maximumBy and minimumBy.

Comment #1

Posted on May 31, 2009 by Quick Rabbit

sortBy is sort(Ord). comparing is Ord.comap minimumBy is foldLeft1(Ord.max)

Status: WontFix

Labels:
Type-Enhancement Priority-Medium