September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,23 @@
|
|||
; empty associative array has two names
|
||||
#empty
|
||||
#()
|
||||
|
||||
; creating the new empty associative array
|
||||
(define empty-map #empty)
|
||||
|
||||
; creating associative array with values
|
||||
(define my-map (list->ff '(
|
||||
(1 . 100)
|
||||
(2 . 200)
|
||||
(7 . 777))))
|
||||
|
||||
; add new key-value pair to the existing associative array
|
||||
(define my-new-map (put my-map 'the-key 'the-value))
|
||||
|
||||
; print our arrays
|
||||
(print empty-map)
|
||||
; ==> #()
|
||||
(print my-map)
|
||||
; ==> #((1 . 100) (2 . 200) (7 . 777))
|
||||
(print my-new-map)
|
||||
; ==> #((1 . 100) (2 . 200) (7 . 777) (the-key . the-value))
|
||||
Loading…
Add table
Add a link
Reference in a new issue