Skip to content

Commit

Permalink
Add comment about annotateSet
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-murphy committed Jul 16, 2021
1 parent c1f12c8 commit 1616b74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/SignalTrisJs/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ setFillStyleC :: Context2D -> Color -> Effect Unit
setFillStyleC ctx = setFillStyle ctx <<< toHexString

-----------------
-- A faster version of this function is proposed in
-- https://github.com/purescript/purescript-ordered-collections/issues/50
annotateSet :: forall a b. Ord a => (a -> b) -> Set a -> Map a b
annotateSet f = mapWithIndex (\k _ -> f k) <<< toMap

Expand Down

0 comments on commit 1616b74

Please sign in to comment.