RosettaCodeData/Task/Associative-array-Iteration/Mathematica/associative-array-iteration.math
2023-07-01 13:44:08 -04:00

8 lines
146 B
Text

keys=DownValues[#,Sort->False][[All,1,1,1]]&;
hashes=#/@keys[#]&;
a[2]="string";a["sometext"]=23;
keys[a]
->{2,sometext}
hashes[a]
->{string,23}