RosettaCodeData/Task/Hash-from-two-arrays/Mathematica/hash-from-two-arrays.math

8 lines
142 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
Map[(Hash[Part[#, 1]] = Part[#, 2]) &,
Transpose[{{1, 2, 3}, {"one", "two", "three"}}]]
?? Hash
->Hash[1]=one
->Hash[2]=two
->Hash[3]=three