I just cant find a way to generate tuples in element R like (1,2) Thats should make <1,1>,<1,2><2,1><2,2>
I just cant find a way to generate tuples in element R like (1,2) Thats should make <1,1>,<1,2><2,1><2,2>
The shortest and most convenient way to take two lists x and y and generate tuples from them is
liftM2 (,) x y
The most self-explanatory way to do this is
[(a, b) | a <- x, b <- y]