Ever been annoyed by having to use C for-loops to do something simple like filtering or collecting objects from NSArray? Blocks finally allow you to get rid of them entirely!
As a Smalltalk lover I really had to write this simple library:
12345678910111213141516171819
[someArrayforEach:^(ideach){// do something with each element}];NSArray*filteredArray=[someArrayfilter:^(ideach){return[eachisEqual:aCoolObject];}];NSArray*collectedArray=[someArraycollect:^(ideach){if([eachisEqual:aCoolObject]){return@"cool";}else{return@"not cool";}}];[someDictionarykeysAndValues:^(idkey,idvalue){//do something with the current key and value}];