I have the following Haskell expression:
3 : [40] ++ [50] ++ 5 : [60]
I would like to know how this expression is evaluated. Which operator has a higher precedence, : or ++?
I think the result of the expression is [3,40,50,5,60], however I did this the following way:
3 : [40] ++ [50] ++ 5 : [60]
3 : [40] ++ [50] ++ [5,60]
3 : [40] ++ [50,5,60]
3: [40,50,5,60]
[3,40,50,5,60]
Is the above the correct way to evaluate the expression? Any insights are appreciated.