purescript-ordered-collections icon indicating copy to clipboard operation
purescript-ordered-collections copied to clipboard

Add annotateSet

Open milesfrain opened this issue 5 years ago • 1 comments

Wanted to make this suggestion isn't forgotten after #31 is merged.

annotateSet :: forall a b. (a -> b) -> Set a -> Map a b
annotateSet f = mapWithIndex (\k _ -> f k) <<< toMap

milesfrain avatar Sep 07 '20 18:09 milesfrain

This would be great. For searchability, this is fromSet in Haskell's containers.

darichey avatar Feb 23 '21 22:02 darichey