[Haskell-cafe] list comprehension with multiplegenerator|targets

Brandon Allbery allbery.b at gmail.com
Mon Nov 10 04:19:02 UTC 2014


On Sun, Nov 9, 2014 at 11:07 PM, Raphaël Mongeau <raphaelsimeon at gmail.com>
wrote:

> This :
> pv a = [t | Just t <- pvc a]
> is strange, can we really do pattern matching inside list comprehension?
>

Yes; that's part of the point of list comprehensions, and of their
extension to (and, back in the very early days, contraction from) monad
comprehensions.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141109/7b763674/attachment.html>


More information about the Haskell-Cafe mailing list