[Haskell-cafe] simple Haskell question - List comprehensions
Philip Müller
mail at philip.in-aachen.net
Sun Mar 9 15:27:58 EDT 2008
Hi,
I'm just working through Hutton's "Programming in Haskell" and I found
an exercise which I can't solve, although it looks simple. Maybe someone
here could give me a hint?
Exercise:
Show how the single comprehension [(x,y) | x <- [1,2,3], y <- [4,5,6]]
with two generators can be re-expressed using two comprehensions with
single generators.
Hint: make use of the library function _concat_.
Thank you very much,
Philip
More information about the Haskell-Cafe
mailing list