What is the expected output of this code?
The lambda evaluates 2 % 2 as 0 and 1 % 2 as 1. The function subtracts these values, producing 0 - 1, or -1.
2 % 2
0
1 % 2
1
0 - 1
-1
Community Discussion