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

Add `annotateSet` function

Open milesfrain opened this issue 4 years ago • 0 comments

Proposing a function to convert a Set to a Map:

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

Previously discussed in #31

milesfrain avatar Jul 16 '21 17:07 milesfrain