RosettaCodeData/Task/Associative-array-Iteration/Maxima/associative-array-iteration.maxima
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

11 lines
203 B
Text

h[1]: 6$
h[9]: 2$
/* iterate over values */
for val in listarray(h) do (
print(val))$
/* iterate over the keys */
for key in rest(arrayinfo(h), 2) do (
val: arrayapply(h, key),
print(key, val))$