Task

The goal is to create an associative array (also known as a dictionary, map, or hash).



Related tasks:

 Associative arrays/Iteration
 Hash from two arrays


See also

 Array
 Associative array: Creation, Iteration
 Collections
 Compound data type
 Doubly-linked list: Definition, Element definition, Element insertion, List Traversal, Element Removal
 Linked list
 Queue: Definition, Usage
 Set
 Singly-linked list: Element definition, Element insertion, List Traversal, Element Removal
 Stack


 
(let* ((my-dict (: dict new))
       (my-dict (: dict store 'key-1 '"value 1" my-dict))
       (my-dict (: dict store 'key-2 '"value 2" my-dict)))
  (: io format '"size: ~p~n" (list (: dict size my-dict)))
  (: io format '"some data: ~p~n" (list (: dict fetch 'key-1 my-dict))))
 
 