Anonymous user
Hash from two arrays: Difference between revisions
→{{header|ooRexx}}: Add example for ooRexx
m (→{{header|REXX}}: changed a comparison to an exact comparison. -- ~~~~) |
(→{{header|ooRexx}}: Add example for ooRexx) |
||
Line 632:
let map = List.fold_right2 StringMap.add keys vals map;;</lang>
=={{header|ooRexx}}==
<lang ooRexx>
array1 = .array~of("Rick", "Mike", "David")
array2 = .array~of("555-9862", "555-5309", "555-6666")
-- if the index items are constrained to string objects, this can
-- be a directory too.
hash = .table~new
loop i = 1 to array1~size
hash[array1[i]] = array2[i]
end
</lang>
=={{header|Oz}}==
<lang oz>declare
|