[swift-evolution] [Discussion] Sortable Attribute
Silvan Mosberger
infinisil at icloud.com
Tue Aug 16 19:17:21 CDT 2016
> I'd be in favor. We'd need another name, since the current closure predicate is already standardized to `by:`.
Haskell uses "on" for sorting with a mapping. There are both
sortOn :: Ord b => (a -> b) -> [a] -> [a]
and
sortBy :: (a -> a -> Ordering) -> [a] -> [a]
in Haskell.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160817/fe58314d/attachment.html>
More information about the swift-evolution
mailing list