Last active
          December 14, 2015 03:39 
        
      - 
      
- 
        Save bencochran/5022700 to your computer and use it in GitHub Desktop. 
Revisions
- 
        bencochran revised this gist Feb 24, 2013 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewingFile renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ @implementation NSNumber (Enumeration) - (void)times:(void (^)(NSUInteger index, BOOL *stop))block { BOOL stop = NO; for (NSUInteger index = 0; index < [self integerValue]; index++) { block(index, &stop); if (stop) break; 
- 
        bencochran created this gist Feb 24, 2013 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ @interface NSNumber (Enumeration) - (void)times:(void (^)(NSUInteger index, BOOL *stop))block; @end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ @implementation NSNumber (Enumeration) - (void)times:(void (^)(NSUInteger index, BOOL *stop))block { BOOL stop = NO; for (NSUInteger index = 0; index < [self integerValue]; index++) { block(index, &stop); if (stop) break; } } @end