aboutsummaryrefslogtreecommitdiff
path: root/src/lisp/test.lisp
blob: a167f28444128a07cf856ab11ce49449d1b21b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(assert-eq
  (range 0 10)
  '(0 1 2 3 4 5 6 7 8 9))

(assert-eq
  (for (i (range 0 10)) (+ i 1))
  (map (lambda (x) (+ x 1)) (range 0 10)))

(assert (and #t #t))
(assert (or #f #t))
(assert (not #f))

(assert-eq
  (for (i '(1 2 3)) (for (j '(1 2 3)) (+ i j)))
  (list '(2 3 4) '(3 4 5) '(4 5 6)))

(assert-eq
  ((lambda (x) x) 2)
  2)