Objective-C library that allows you to use forEach, filter or collect on NSArray
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with mirkokiefer:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LivelyBlocksTest
CollectionIterators.h
CollectionIterators.m
LCBlock.h
LCBlock.m
LCBlockStructures.h
LivelyBlocks-Prefix.pch
LivelyBlocks.h
README.md

README.md

Objective-C Pretty Iterators

Ever been annoyed by having to use C for-loops to do something simple like filtering or collecting objects from NSArray? This library will give you some relief:

[someArray forEach:^(id each) {
  // do something with each element
}];

NSArray* filteredArray = [someArray filter:^(id each) {
  return [each isEqual: aCoolObject];
}];

NSArray* collectedArray = [someArray collect: ^(id each) {
  if([each isEqual: aCoolObject]) {
    return @"cool";
  } else {
    return @"not cool";
  }
}];

[someDictionary keysAndValues: ^(id key, id value) {
  //do something with the current key and value
}];