purescript-arrays icon indicating copy to clipboard operation
purescript-arrays copied to clipboard

groupWith?

Open AlexMouton opened this issue 7 years ago • 2 comments

i see sortBy/sortWith, but only groupBy. Minor convenience but it would be nicely parallel, and this missing one is often what I want: Theres no new logic, I just need to dive into some structure.

AlexMouton avatar Feb 17 '18 06:02 AlexMouton

Pretty sure we can close this now. groupWith was added recently under the name groupAllBy

JordanMartinez avatar Jan 01 '21 00:01 JordanMartinez

I don't think so; groupWith would be something like forall a b. Ord b => (a -> b) -> Array a -> Array (NonEmptyArray a). It would be a shorthand for \f -> groupBy (compare `on` f) or something similar.

hdgarrood avatar Jan 01 '21 04:01 hdgarrood