Anonymous user
Associative array/Creation: Difference between revisions
→{{header|Scheme}}
Line 1,286:
=={{header|Scheme}}==
Scheme has association lists (alists), which are inefficient, ordered maps with arbitrary keys and values
(assoc 'a my-dict) ; evaluates to 'b</lang>
Hash tables are provided by SRFI-69 [http://srfi.schemers.org/srfi-69/srfi-69.html]. Many Scheme implementation also provide native hash tables.
▲(define my-alist '((a b) (1 hello) ("c" (a b c)))
(define my-hash (alist->hash-table my-alist))▼
<lang scheme>(define my-alist '((a b) (1 hello) ("c" (a b c)))
▲(define my-hash (alist->hash-table my-alist))</lang>
=={{header|Seed7}}==
|