We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5041ba4 + 35dd274 commit e8b1754Copy full SHA for e8b1754
1 file changed
src/Effect/Ref.purs
@@ -29,5 +29,8 @@ foreign import modify' :: forall s b. (s -> { state :: s, value :: b }) -> Ref s
29
modify :: forall s. (s -> s) -> Ref s -> Effect s
30
modify f = modify' \s -> let s' = f s in { state: s', value: s' }
31
32
+modify_ :: forall s. (s -> s) -> Ref s -> Effect Unit
33
+modify_ f s = void $ modify f s
34
+
35
-- | Update the value of a mutable reference to the specified value.
36
foreign import write :: forall s. s -> Ref s -> Effect Unit
0 commit comments