[swift-evolution] [Discussion] Sortable Attribute
xiaodi.wu at gmail.com
Tue Aug 16 19:22:21 CDT 2016
Perfect. I use the phrase "sort on" often and was thinking of suggesting
that, but I was afraid it was just jargon in my line of work.
On Tue, Aug 16, 2016 at 19:17 Silvan Mosberger <infinisil at icloud.com> wrote:
> 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
> <http://hackage.haskell.org/package/base-220.127.116.11/docs/Data-Ord.html#t:Ord> b
> => (a -> b) -> [a] -> [a]
> sortBy :: (a -> a -> Ordering
> -> [a] -> [a]
> in Haskell.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution