Skip to content

Instantly share code, notes, and snippets.

@casademora
Created May 28, 2013 20:27
Show Gist options
  • Save casademora/5665837 to your computer and use it in GitHub Desktop.
Save casademora/5665837 to your computer and use it in GitHub Desktop.
@implementation NSNumber (PandaHelpers)
- (void) mgp_times:(void(^)(NSInteger))thingToDo;
{
NSAssert(thingToDo, @"No operation to perform");
for (NSInteger i = 0; i < [self integerValue]; i++)
{
thingToDo(i);
}
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment