[Haskell-beginners] Question about example in 'using do notation with Writer' section of LYH

Imants Cekusins imantc at gmail.com
Thu Jan 26 16:10:55 UTC 2017


> what becomes of the string parts of the Writer monads

multWithLog keeps [String] and outputs Int

to fully benefit from Writer [String] Int, you'd call e.g. runWriter
or execWriter

similar to other *State state out* monads,

*m state out* lets you get/set/keep state as needed without passing it as
an arg. *state* is there if you need it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170126/4c9535b0/attachment.html>


More information about the Beginners mailing list