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.
2 parents b5cc7d6 + 5ad3b7b commit 91c84c7Copy full SHA for 91c84c7
src/Control/Monad/Writer.purs
@@ -22,6 +22,10 @@ import Data.Tuple (Tuple, snd)
22
-- | to the `Identity` monad.
23
type Writer w = WriterT w Identity
24
25
+-- | Creates a `Writer` from a result and output pair.
26
+writer :: forall w a. Tuple a w -> Writer w a
27
+writer = WriterT <<< pure
28
+
29
-- | Run a computation in the `Writer` monad
30
runWriter :: forall w a. Writer w a -> Tuple a w
31
runWriter = unwrap <<< runWriterT
0 commit comments