Can I unsugar list comprehension in this expression:
[(i,j) | i <- [1..4], j <- [i+1..4]]
This is the output:
[(1,2),
The desugared code is:
concatMap (\i -> concatMap (\j -> (i, j) : []) [i+1..4]) [1..4]
Which can be refactored to Tsuyoshi Ito's answer.