Skip to content

Instantly share code, notes, and snippets.

@theoknock
Last active September 6, 2022 15:25
Show Gist options
  • Save theoknock/5d1f54d3b1b9b7576f1f4cfb700ef954 to your computer and use it in GitHub Desktop.
Save theoknock/5d1f54d3b1b9b7576f1f4cfb700ef954 to your computer and use it in GitHub Desktop.
Bitwise recursive block
__block unsigned long (^recursive_block)(unsigned long);
(recursive_block = ^ unsigned long (unsigned long index) {
printf("index == %lu\n", index);
return (unsigned long)(index ^ (unsigned long)(recursive_block)(~-index));
})(10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment