24 lines
432 B
Text
24 lines
432 B
Text
(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))
|
|
|
|
(assert (= (set {:foo 1} :bar 2)
|
|
{:foo 1 :bar 2}))
|
|
|
|
(assert (= (set [1 2] 1 42)
|
|
[1 42]))
|
|
|
|
;; Accessing collections by symbol
|
|
(assert (= (get {:foo 1 :bar 2} :bar)
|
|
2))
|
|
|
|
;; quotes
|
|
(assert (= '(1 2 3) (list 1 2 3)))
|