I’m learning Haskell and I came across this example in relation to list comprehensions:
[x | xs <- [[(3,4)],[(5,4),(3,2)]], (3,x) <- xs]
The answer given is:
[4,2]
.
Why isn’t the answer [(3,4),(3,2)]
?
I’m learning Haskell and I came across this example in relation to list comprehensions:
[x | xs <- [[(3,4)],[(5,4),(3,2)]], (3,x) <- xs]
The answer given is:
[4,2]
.
Why isn’t the answer [(3,4),(3,2)]
?