Last active
August 29, 2015 14:27
-
-
Save uliwitness/99896362775beeefc813 to your computer and use it in GitHub Desktop.
The horrible syntax you need to declare a function that returns a block:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void (^blockreturner(void))( int a, int b ) | |
{ | |
return ^(int a, int b){ printf("%d %d\n",a,b); }; | |
} | |
int main(int argc, char *argv[]) { | |
blockreturner()( 1, 2 ); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment