> ((list-recur list '()) '(1 2 3)) '(1 (2 (3 ()))) > (map list '(1 2 3)) '((1) (2) (3)) > (define add1 (list-recur add1 '())) > (add1 '(2 3 4)) . . add1: arity mismatch; the expected number of arguments does not match the given number expected: 1 given: 2 > (define add1 (list-recur (lambda (x y) (cons (+ x 1) y)) '())) > (add1 '(1 2 3)) '(2 3 4) > (define count (list-recur (lambda (x y) (+ y 1)) 0)) > (count '(1 2 1 1)) 4 > (define reverse (list-recur (lambda (x y) (cons y x)) '())) > (reverse '(a b c)) '(((() . c) . b) . a) > (define reverse (list-recur (lambda (x y) (append y x)) '())) > (reverse '(a b c)) . . append: contract violation expected: list? given: 'c > (define reverse (list-recur (lambda (x y) (append y (list x))) '())) > (reverse '(a b c)) '(c b a) > (define flatten (list-recur (lambda (x y)(cons x y)) '())) > (flatten '((2 3) 4 ((5)))) '((2 3) 4 ((5))) > > (define sum (snlist-recur + + 0)) > (sum '((2 3) 4 ((5)))) 14 > (define count (snlist-recur + (lambda (x y) (+ y 1)) 0)) > (count '((2 3) 4 ((5)))) 4 > (define reverse (snlist-recur (lambda (x y) (cons y x)) (lambda (x y) (cons y (list x))) '())) > (reverse '((2 3) 4 ((5)))) '(((() () () 5) 4) (() 3) 2) > (define reverse (snlist-recur (lambda (x y) (append y x)) (lambda (x y) (cons y (list x))) '())) > (reverse '((2 3) 4 ((5)))) '((() 5) 4 (() 3) 2) > (define reverse (snlist-recur (lambda (x y) (append y x)) (lambda (x y) (append y (list x))) '())) > (reverse '((2 3) 4 ((5)))) '(5 4 3 2) > (define reverse (snlist-recur (lambda (x y) (cons y x)) (lambda (x y) (append y (list x))) '())) > (reverse '((2 3) 4 ((5)))) '((() () 5 4) 3 2) > (define reverse (snlist-recur (lambda (x y) (append y (list x))) (lambda (x y) (append y (list x))) '())) > (reverse '((2 3) 4 ((5)))) '(((5)) 4 (3 2)) > > (expression? 'a) #t > (expression? 3) #f > (expression? '(lambda (x) x)) #t > (expression? '(lambda (x) 3)) #f > (expression? '((lambda (x) x) y)) #t > (expression? '(lambda x)) #f > (expression? '(a b)) #t > lambda . lambda: bad syntax in: lambda > a . . a: undefined; cannot reference an identifier before its definition > '(lambda x) '(lambda x) > (car '(lambda x)) 'lambda > '(+ 3 4) '(+ 3 4) > (define lambda 3) > lambda 3 >