If I had an NSDictionary like this:
NSMutableDictionary *valuesDictionary = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithDouble:-60.0],@”a”,
[NSNumber numberWithDouble:0.0],@”b”,
[NSNumber numberWithDouble:-12.0],@”c”,
[NSNumber numberWithDouble:.3],@”x”, nil];
and an array like this:
NSArray *program = [NSArray arrayWithObjects: @"a",@"12.6",@"100",@"+",@"x",nil];
what would the code look like to return an array programWithVariableValues, for example, consisting of @”-60″,@”12.6″,@”100″,@"+",@”.3″,nil?
(replacing any variables found in the array with their valueforkey’s)
Would that be a good place to utilize NSPredicate? or just fast enumeration? or something else?