Associative array/Creation: Difference between revisions

Added PicoLisp
(J bugfix (and minor style change))
(Added PicoLisp)
Line 682:
echo "Key: $key Value: $value";
}</lang>
 
=={{header|PicoLisp}}==
Here we use symbol properties. Other possiblities could be
[http://software-lab.de/doc/refI.html#idx index trees] or
[http://software-lab.de/doc/refA.html#assoc association lists].
 
<lang PicoLisp>(put 'A 'foo 5)
(put 'A 'bar 10)
(put 'A 'baz 15)
(put 'A 'foo 20)
 
: (get 'A 'bar)
-> 10
 
: (get 'A 'foo)
-> 20
 
: (show 'A)
A NIL
foo 20
bar 10
baz 15</lang>
 
=={{header|Pop11}}==
Anonymous user