Skip to content

Instantly share code, notes, and snippets.

@onuryilmaz
Created March 10, 2016 13:31
Show Gist options
  • Save onuryilmaz/4247617ca3b4aab8ef22 to your computer and use it in GitHub Desktop.
Save onuryilmaz/4247617ca3b4aab8ef22 to your computer and use it in GitHub Desktop.
#define $(i, f) \
({ int _temp = 0; \
int _size = sizeof(i) / sizeof(typeof((*i))); \
do { \
(lambda(void, (typeof((*i)) _ ) {f;} ))( *(i+_temp) ); \
} while( ++_temp < _size ); \
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment