Skip to content

Instantly share code, notes, and snippets.

@adhumi
Created April 29, 2014 09:22
Show Gist options
  • Save adhumi/11395047 to your computer and use it in GitHub Desktop.
Save adhumi/11395047 to your computer and use it in GitHub Desktop.
typedef int(^Block)(void);
Block b[3];
for (int i = 0; i < 3; i++)
b[i] = ^{return i;};
for (int i = 0; i < 3; i++)
NSLog(@"%d", b[i]());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment