RosettaCodeData/Task/Hash-from-two-arrays/Mathematica/hash-from-two-arrays.math
2023-07-01 13:44:08 -04:00

7 lines
142 B
Text

Map[(Hash[Part[#, 1]] = Part[#, 2]) &,
Transpose[{{1, 2, 3}, {"one", "two", "three"}}]]
?? Hash
->Hash[1]=one
->Hash[2]=two
->Hash[3]=three