Created
May 16, 2012 10:27
-
-
Save beelsebob/2709325 to your computer and use it in GitHub Desktop.
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 characters
| - (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); | |
| } |
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 characters
| - (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