pandamonia/BlocksKit — pull request #128 by kaelin (2013-03-22 14:30:55+00:00)
Title: Useful method added to NSIndexSet+BlocksKit; please consider taking it as my contribution & thanks.

```objc
/** Call the block once for each index and create an array of the return values.

This method allows transforming indexes into objects:
int values[10] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 };
NSIndexSet *idxs = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 10)];
NSArray *new = [idxs mapIndex:^id(NSUInteger index) {
return [NSNumber numberWithInt:values[index]]);
}];

@param block A block that returns an object for an index.
@return Returns an array of the objects returned by the block.
*/
- (NSArray *)mapIndex:(BKIndexMapBlock)block;
```