Show HN: A Y Combinator for Objective-C
github.com
github.com
__block void (^myBlock);
myBlock = ^{ myBlock(); };
myBlock();
The only thing you have to watch out for is when the block gets copied prior to its invocation (e.g. if you pass it to some function that does a Block_copy on it). In that case you have to first copy the block yourself and update your block variable: __block void (^myBlock);
myBlock = [^{ myBlock(); } copy];
someFunctionThatCopiesTheBlock(myBlock);