Add more arithmetic checks.
[berndj-bootstrap.git] / lisp / test-input
blob455c6f3fd1381151baa936be65f033bd7d0f0be7
1 (+ 4 5)
2 (+ 1 2 3 4 5)
3 (- 23 7)
4 (- 15 5 4 3)
5 (- 17)
6 (cons 17 42)
7 (car (cons 17 42))
8 #t
9 cons
10 lambda
11 (lambda () 42)
12 ((lambda () 42))
13 ((lambda (a) (+ 2 a)) 17)
14 (quote ())
15 (quote (a b c))
16 (if #t 17 42)
17 (if #f 17 42)
18 (if #f 17)
19 (eq? (quote ()) (quote ()))
20 (eq? 12 12)
21 (eq? 12 24)
22 (eq? (cons 2 3) (cons 2 3))
23 (eq? (quote foo) (quote foo))
24 (eq? (quote foo) (quote bar))
25 (eq? "foo" "foo")
26 (eq? "foo" (quote foo))
27 (list? 17)
28 (list? (cons 17 42))
29 (list? (cons 17 (quote ())))
30 (primitive-eval (quote (+ 17 42)))
31 (define (foo a b) (+ a b)) (foo 17 42)
32 (cdr (quote (17 . 42)))
33 (quote (17 . (12 14)))
34 (define (foo x) (if (eq? x 5) 1 (+ (foo (+ x 1)) (foo (+ x 1))))) (foo 2)
35 ((lambda rest (cdr rest)) 1 2 3 4)
36 (define (mylist . rest) rest) (mylist 1 2 3 4)
37 (define (mymap f l) (if (eq? l (quote ())) (quote ()) (cons (f (car l)) (mymap f (cdr l))))) (mymap (lambda (x) (+ x 1)) (quote (1 2 4 8)))
38 (string->list "hello")