Support variable argument lists.
[berndj-bootstrap.git] / lisp / test-input
bloba633e49f2fd61073da6fc32369b3ed769e7ef837
1 (+ 4 5)
2 (cons 17 42)
3 (car (cons 17 42))
4 #t
5 cons
6 lambda
7 (lambda () 42)
8 ((lambda () 42))
9 ((lambda (a) (+ 2 a)) 17)
10 (quote ())
11 (quote (a b c))
12 (if #t 17 42)
13 (if #f 17 42)
14 (if #f 17)
15 (eq? (quote ()) (quote ()))
16 (eq? 12 12)
17 (eq? 12 24)
18 (eq? (cons 2 3) (cons 2 3))
19 (eq? (quote foo) (quote foo))
20 (eq? (quote foo) (quote bar))
21 (eq? "foo" "foo")
22 (eq? "foo" (quote foo))
23 (list? 17)
24 (list? (cons 17 42))
25 (list? (cons 17 (quote ())))
26 (primitive-eval (quote (+ 17 42)))
27 (define (foo a b) (+ a b)) (foo 17 42)
28 (cdr (quote (17 . 42)))
29 (quote (17 . (12 14)))
30 (define (foo x) (if (eq? x 5) 1 (+ (foo (+ x 1)) (foo (+ x 1))))) (foo 2)
31 ((lambda rest (cdr rest)) 1 2 3 4)
32 (define (mylist . rest) rest) (mylist 1 2 3 4)
33 (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)))