/ CircleJoinRequested / NSArray+map.m
NSArray+map.m
 1  //
 2  //  NSArray+map.m
 3  //  Security
 4  //
 5  //  Created by J Osborne on 3/8/13.
 6  //  Copyright (c) 2013 Apple Inc. All Rights Reserved.
 7  //
 8  
 9  #import "NSArray+map.h"
10  
11  @implementation NSArray (map)
12  
13  -(NSArray*)mapWithBlock:(mapBlock)block
14  {
15      NSMutableArray *results = [[NSMutableArray alloc] initWithCapacity:self.count];
16      
17      for (id obj in self) {
18          [results addObject:block(obj)];
19      }
20      
21      return [results copy];
22  }
23  
24  @end