2024-09-02 08:29:32 +00:00
|
|
|
(assert (= [1 2 (+ 3 4)]
|
|
|
|
[1 2 7]))
|
|
|
|
|
|
|
|
(assert (= (get [1 2 3] 2)
|
|
|
|
3))
|
|
|
|
|
|
|
|
(assert (= {1 2 (+ 1 2) 4}
|
|
|
|
{1 2 3 4}))
|
|
|
|
|
|
|
|
(assert (= (get {1 2 3 4} 3)
|
|
|
|
4))
|
2024-09-04 22:24:12 +00:00
|
|
|
|
|
|
|
;; Accessing collections by symbol
|
|
|
|
(assert (= (get {:foo 1 :bar 2} :bar)
|
|
|
|
2))
|
2024-09-07 19:31:39 +00:00
|
|
|
|
|
|
|
;; quotes
|
|
|
|
(assert (= '(1 2 3) (list 1 2 3)))
|