I'm trying to learn Haskell, and I'm doing some exercises that involves lists. But I'm struggling with an exercise about list comprehension, and I really need someone to help me with this. The exercise reads:
Show how the list comprehension [(x,y) | x <- [1,2], y <- [3,4]] with two generators
can be re-expressed using two comprehensions with single generators.
Hint: nest one comprehension within the other and make use of the library function concat :: [[a]] -> [a].
I appreciate all answers and explanations. Thanks.