I found this piece of code on GitHub but didn't quite understand it:
#define lambda(ret_type, _body) ({ ret_type _ _body _; })
Then:
int (*max)(int, int) = lambda(int,
(int x, int y) {
return x > y ? x : y;
});
int max_value = max(1, 2);
// max_value is 2
What are the underscores doing inside the #define
and how does it return a function pointer?