RosettaCodeData/Task/Associative-array-Iteration/Mathematica/associative-array-iteration.math
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07: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}