1 ;; Testing cons function
8 (cons (list 1) (list 2 3))
17 ;; Testing concat function
22 (concat (list 1 2) (list 3 4))
24 (concat (list 1 2) (list 3 4) (list 5 6))
31 (concat a b (list 5 6))
38 ;; Testing regular quote
46 ;; Testing simple quasiquote
51 (quasiquote (1 2 (3 4)))
57 (quasiquote (unquote 7))
63 (quasiquote (unquote a))
67 (quasiquote (1 (unquote a) 3))
69 (def! b (quote (1 "b" "d")))
73 (quasiquote (1 (unquote b) 3))
77 ;; Testing splice-unquote
78 (def! c (quote (1 "b" "d")))
82 (quasiquote (1 (splice-unquote c) 3))
86 ;; Testing symbol equality
87 (= (quote abc) (quote abc))
89 (= (quote abc) (quote abcd))
95 (= "abc" (str (quote abc)))
103 ;;; TODO: needs expect line length fix
104 ;;;((fn* [q] (quasiquote ((unquote q) (quote (unquote q))))) (quote (fn* [q] (quasiquote ((unquote q) (quote (unquote q)))))))
105 ;;;=>((fn* [q] (quasiquote ((unquote q) (quote (unquote q))))) (quote (fn* [q] (quasiquote ((unquote q) (quote (unquote q)))))))
109 ;; -------- Deferrable Functionality --------
111 ;; Testing ' (quote) reader macro
119 ;; Testing ` (quasiquote) reader macro
129 ;; Testing ~ (unquote) reader macro
136 (def! b '(1 "b" "d"))
143 ;; Testing ~@ (splice-unquote) reader macro
144 (def! c '(1 "b" "d"))
154 ;; -------- Optional Functionality --------
156 ;; Testing cons, concat, first, rest with vectors
162 (concat [1 2] (list 3 4) [5 6])
165 ;; Testing unquote with vectors
173 ;; Testing splice-unquote with vectors
174 (def! c '(1 "b" "d"))
179 ;;;;=>[1 1 "b" "d" 3]