1
0
Fork 0
lesson-lisp/tests/syntax.scm

33 lines
925 B
Scheme
Raw Normal View History

2023-05-06 12:58:11 -04:00
(begin
(displayln "--- TEST: begin ------------------------------------------------")
(displayln (begin))
(displayln (begin 123))
(displayln (begin 123 456))
(displayln (begin 123 456 789))
(newline)
(displayln "--- TEST: if ---------------------------------------------------")
(displayln (if #true 123 456))
(displayln (if "foo" 123 456))
(displayln (if #false 123 456))
(newline)
(displayln "--- TEST: quote ------------------------------------------------")
(displayln (quote +))
(displayln '+)
(displayln (quote ()))
(displayln '())
(displayln (quote #true))
(displayln '#true)
(displayln (quote #false))
(displayln '#false)
;(displayln (quote #\n))
;(displayln '#\n)
(displayln (quote foo))
(displayln 'foo)
(displayln (quote "foo"))
(displayln '"foo")
(displayln (quote 123))
(displayln '123)
(displayln (quote (cons 123 456)))
(displayln '(cons 123 456))
)