Hash from two arrays: Difference between revisions
Content deleted Content added
No edit summary |
added objective c |
||
Line 214: | Line 214: | ||
map[ keys[i] ] = values[i]; |
map[ keys[i] ] = values[i]; |
||
} |
} |
||
=={{header|Objective-C}}== |
|||
NSArray *keys = [NSArray arrayWithObjects:@"a", @"b", @"c", nil]; |
|||
NSArray *values = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], |
|||
[NSNumber numberWithInt:2], |
|||
[NSNumber numberWithInt:3], nil]; |
|||
NSDictionary *dict = [NSDictionary dictionaryWithObjects:values forKeys:keys]; |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |