Haskell Language List Comprehensions Parallel Comprehensions


Example

With Parallel List Comprehensions language extension,

[(x,y) | x <- xs | y <- ys]

is equivalent to

zip xs ys

Example:

[(x,y) | x <- [1,2,3] | y <- [10,20]] 

-- [(1,10),(2,20)]