Tomas Petricek
In The Monad.Reader Issue 18 (Unreviewed article)
Monad comprehensions have an interesting history. They were the first syntactic extension for
programming with monads. They were implemented in Haskell, but later replaced with plain list
comprehensions and monadic do notation. Now, monad comprehensions are back in Haskell,
more powerful than ever before!
Redesigned monad comprehensions generalize the syntax for working with lists. Quite interestingly, they also generalize syntax for zipping, grouping and ordering of lists. This article shows how to use some of the new expressive power when working with well-known monads. You'll learn what "parallel composition" means for parsers, a poor man's concurrency monad and an evaluation order monad.
@other{comprefun,
author = {Petricek, Tomas},
title = {{F}un with {P}arallel {M}onad {C}omprehensions},
howpublished = {Available online in {T}he {M}oand.{R}eader {I}ssue 18},
year = {2011},
url = {http://www.cl.cam.ac.uk/{\textasciitilde}tp322/articles/comprefun.pdf},
}
If you have any comments, suggestions or related ideas, I'll be happy to hear from you at