Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,31 @@
;;; empty associative array
#empty
; or short form
#e
;;; creating the new empty associative array
(define empty-map #empty)
;;; creating associative array with values
(define my-map (pairs->ff '(
(1 . 100)
(2 . 200)
(7 . 777))))
;;; or in short form (available from Ol version 2.1)
(define my-map {
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))