We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3261806 commit 5e0f904Copy full SHA for 5e0f904
src/Control/Monad/Writer.purs
@@ -11,5 +11,8 @@ type Writer w a = WriterT w Identity a
11
runWriter :: forall w a. Writer w a -> Tuple a w
12
runWriter = runIdentity <<< runWriterT
13
14
+execWriter :: forall w a. Writer w a -> w
15
+execWriter m = snd (runWriter m)
16
+
17
mapWriter :: forall w1 w2 a b. (Tuple a w1 -> Tuple b w2) -> Writer w1 a -> Writer w2 b
18
mapWriter f = mapWriterT (Identity <<< f <<< runIdentity)
0 commit comments