Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Created May 16, 2012 10:27
Show Gist options
  • Select an option

  • Save beelsebob/2709325 to your computer and use it in GitHub Desktop.

Select an option

Save beelsebob/2709325 to your computer and use it in GitHub Desktop.
- (void)printDummyStuff
{
TestClass1 *tc1 = [[TestClass1 alloc] init];
[tc1 performSimulationWithFitnessFunction:^ int (int a)
{
int b = [self stuff:a];
int c = [self magic];
return b * (c + b * c);
}];
}
- (void)print:(NSString *)number
{
NSLog(@"Print dummy stuff! %@", number);
}
- (void)performSimulationWithFitnessFunction:(int(^)(int))f
{
[self setFitnessFunction:f];
[object performSimulationWithFitnessFunction:f];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment