List comprehensions

Jan de Wit Jan.de.Wit@triopsys.nl
Thu, 30 Jan 2003 12:10:30 +0100


> Hello,
> 
> Recently, I came accross this
> expression:
> [ x + y | x <- xs | y <- ys ]
> 
> As far as I can see (Haskell Report),
> this is not allowed by the haskell 98
> standard. So I assume it to be an ex-
> tension. Where can I find information
> about this?
This is a parallel list comprehension, a GHC extension. See 
http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#PA
RALLEL-LIST-COMPREHENSIONS
for more info. The code above does the same as zipWith (+) xs ys, basically.


Cheers, Jan
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/

###########################################