> (cons 2 3) (2 . 3) > (car (cons 2 3)) 2 > (cdr (cons 2 3)) 3 > (pair? 2) #f > (pair? (cons 2 3)) #t > (define weird (cons (cons 2 +) (cons 'cons #t))) > weird ((2 . #) cons . #t) > (lambda (x) (x 3 5)) # > (lambda (x) (x 2 +)) # > (lambda-cons 2 3) # > (lambda-car (lambda-cons 3 5)) 3 > (lambda-cdr (lambda-cons 3 5)) 5 > () #%app: missing procedure expression; probably originally (), which is an illegal empty application in: (#%app) > '() () > (cons '() '()) (()) > (cons 2 3) (2 . 3) > (1 . 2) #%app: bad syntax in: (#%app 1 . 2) > '(2 . (3 . ())) (2 3) > '(2 . (3 . ())) (2 3) > '(1 . (2 . (3 . ()))) (1 2 3) > '(() . (() . ())) (() ()) > '(1 . (2 . ())) (1 2) > '(1 . (2 . 3)) (1 2 . 3) > '(1 . (2 . (3 . +))) (1 2 3 . +) > (define l '(1 2 3)) > (car l) 1 > (cdr l) (2 3) > (car (cdr l)) 2 > (car (cdr (cdr l))) 3 > (pair? '()) #f > (null? '()) #t > (list? '(1 2 3)) #t > (list? '(1 . (2 . (3 . +)))) #f > (list? '(1 . (2 . (3 . ())))) #t > (list? '(1 . (2 . (3 . ())))) p: undefined; cannot reference an identifier before its definition > (list? '(1 . (2 . (3 . ())))) #t > (list? '(1 . (2 . (3 . +)))) #f > (list? '(1 . (2 . (3 . +)))) mcdr: contract violation expected: mpair? given: + > (list? '(1 . (2 . (3 . +)))) #f > (list? '(1 . (2 . (3 . ())))) #t > '(1 2 3) (1 2 3) > '((+ 2 3) (- 4 1)) ((+ 2 3) (- 4 1)) > '(cons (+ 2 3) (cons (- 4 1) '())) (cons (+ 2 3) (cons (- 4 1) '())) > (cons (+ 2 3) (cons (- 4 1) '())) (5 3) > (list (+ 2 3) (- 4 1)) (5 3) > (list) () > (cons) mcons: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 0 > (list 1 2) (1 2) > (cons 1 2) (1 . 2) > (cadr l) l: undefined; cannot reference an identifier before its definition > (define l (list 1 2 3)) > (cadr l) 2 > (caaaaaaar '(1 2 3 4 5 6 7 8 9 10)) caaaaaaar: undefined; cannot reference an identifier before its definition > (cons 2 2) (2 . 2) > (eq? 2 2) #t > (eq? #t #t) #t > (= #t #t) =: contract violation expected: number? given: #t > (eq? "abc" "abc") #t > (eqv? "abc" "abc") #t > (define x 3) > (eq? x 3) #t > (define y 3) > (eq? x y) #t > (define x +) > (eq? x +) #t > (define id (lambda (x) x)) > (define id2 (lamdba (x) x)) lamdba: undefined; cannot reference an identifier before its definition > (define id2 (lambda (x) x)) > (eq? id id2) #f > (eqv? id id2) #f > (define l1 (list 1 2 3)) > (define l2 (list 1 2 3)) > (eq? l1 l2) #f > (eq? (cons 1 2) (cons 1 2)) #f > (eqv? l1 l2) #f > (eq? 3 +) #f > (= 3 +) =: contract violation expected: number? given: # > (define x 3) > (define x (cons + *)) > (define x +)) read-syntax: unexpected `)` > (define x +) > (eq? x +) #t > (eq? (cons 2 3) (cons 2 3)) #f > (eq? (lambda () 1) (lambda () 1)) #f > (= 1 #t) =: contract violation expected: number? given: #t > (eq? (lambda (x) x) 3) #f > (eq? (cons 1 2) (cons 1 2)) #f > (eqv? (cons 1 2) (cons 1 2)) #f > (equal? (cons 1 2) (cons 1 2)) #t > (equal? (cons 1 (cons 2 3)) (cons 1 (cons 2 3))) #t > (equal? (list 1 2 3 4) (list 1 2 3 4)) #t > (equal? (list 1 2 3 4) (list 1 7 3 4)) #f > (length '(1 2 3 4)) 4 > (length '(1 2 3 4)) 4 > (append '(1 2 3) '(4 5 6)) (1 2 3 4 5 6) > (append '(1 2 3) '(4 5 6) '(7 8 9)) (1 2 3 4 5 6 7 8 9) > (append '(1 2 3)) (1 2 3) > (append) () > (cons '(1 2) '(3 4)) ((1 2) 3 4) > (list '(1 2) '(3 4)) ((1 2) (3 4)) > (append '(1 2) '(3 4)) (1 2 3 4) > (append '(1 2) '(3 4)) (1 2 3 4) > (append '(1 2 3) '(4 5 6)) (1 2 3 4 5 6) > (append '(1 2 3) '(4 5 6)) (1 (2 (3 (4 5 6)))) > (append '(1 2 3) '(4)) (1 2 3 4) > (equal > (equal? l (copy l)) l: undefined; cannot reference an identifier before its definition > (define l '(1 2 3)) > (equal? l (copy l)) #t > (eq? l (copy l)) #f > (reverse '(1 2 3)) (3 2 1) > (reverse '(1 2 3)) mcar: contract violation expected: mpair? given: 3 > (reverse '(1 2 3)) (car l car l car l) > (reverse '(1 2 3)) (3 2 1) > (reverse '(1 2 3)) (3 2 1) > (list-tail '(1 2 3) 2) (3) > (list-tail '(1 2 3) 5) mcdr: contract violation expected: mpair? given: () > (list-tail '(1 2 3) 5) repeated: undefined; cannot reference an identifier before its definition > (list-tail '(1 2 3) 5) mcdr: contract violation expected: mpair? given: () > (list-tail '(1 2 3) 2) (3) > (list-tail '(1 2 3) 0) (1 2 3) > (list-ref '(1 2 3) 2) 3 > (list-ref '(1 2 3) 2) mcar: contract violation expected: mpair? given: 1 > (list-ref '(1 2 3) 2) 3 > (list-ref '(1 2 3) 5) mcdr: contract violation expected: mpair? given: () > (member 5 '(1 2 3)) #f > (member 2 '(1 2 3)) (2 3) > (member 2 (cdr (member 2 '(1 2 3)))) #f > (member 2 (cdr (member 2 '(1 2 3 2)))) (2) > (member 2 (cdr (member 2 '(1 2 3 2)))) (2) > (member 2 (cdr (member 2 '(1 2 3)))) #f > (member 5 '(1 2 3)) #f > (member 2 '(1 2 3)) #t > (member? 2 '(1 2 3)) #t > (member 2 '(1 2 3)) (2 3) > (member (cons 3 6) (list 1 (cons 3 6) 3)) ((3 . 6) 3) > (member2 (cons 3 6) (list 1 (cons 3 6) 3) eq?) member2: arity mismatch; the expected number of arguments does not match the given number expected: 3 given: 2 > (member2 (cons 3 6) (list 1 (cons 3 6) 3) eq?) #f > (member2 (cons 3 6) (list 1 (cons 3 6) 3) eqv?) #f > (memv (cons 3 6) (list 1 (cons 3 6) 3)) #f >