Top "Monads" questions

A monad in programming is a composable computation description.

How do I do logging in Haskell?

I'm attempting to use HSlogger to get some information about my program. So I add the following line to my …

logging haskell monads
How to extract value from monadic action

Is there a built-in function with signature :: (Monad m) => m a -> a ? Hoogle tells that there is …

haskell monads comonad
Scalaz iteratees: "Lifting" `EnumeratorT` to match `IterateeT` for a "bigger" monad

If I have an EnumeratorT and a corresponding IterateeT I can run them together: val en: EnumeratorT[String, Task] = EnumeratorT.…

scala monads scalaz enumerator iterate
Use of Haskell state monad a code smell?

God I hate the term "code smell", but I can't think of anything more accurate. I'm designing a high-level language &…

haskell coding-style monads state-monad
How to play with Control.Monad.Writer in haskell?

I'm new to functional programming and recently learning at Learn You a Haskell, but when I went through this chapter, …

haskell monads
Difference between Monad and Applicative in Haskell

I just read the following from typeclassopedia about the difference between Monad and Applicative. I can understand that there is …

haskell monads applicative
Monads with Join() instead of Bind()

Monads are usually explained in turns of return and bind. However, I gather you can also implement bind in terms …

haskell monads
Applicatives compose, monads don't

Applicatives compose, monads don't. What does the above statement mean? And when is one preferable to other?

haskell functional-programming monads monad-transformers applicative
Should do-notation be avoided in Haskell?

Most Haskell tutorials teach the use of do-notation for IO. I also started with the do-notation, but that makes my …

haskell functional-programming io monads do-notation
Difference between State, ST, IORef, and MVar

I am working through Write Yourself a Scheme in 48 Hours (I'm up to about 85hrs) and I've gotten to the …

variables haskell monads state-monad ioref