I am trying to understand the concept of Monads and came across this list comprehension syntax for filtering sums from 2 lists.
largeSums = [i+j | i <- [10, 20, 30], j <- [1 , 2] , (i+j)>20]
I am trying to rewrite this using the do notation but do not understand what goes inside the else
part:
largeSums = do
i <- [10, 20, 30]
j <- [1 , 2]
if i+j > 20
then return (i+j)
else