It works like a foreach loop, so
foreach (x in [1..3]) {
foreach (y in [x .. x * 2]) {
yield y;
}
}
First x is 1, so y in [1 .. 2]
Then x is 2, so y in [2 .. 4]
Then x is 3, so y in [3 .. 6]
Concatenate these results together and you get the final result.
solved Answer to this Haskell expression [closed]