;;; ========================================== ;;; CMPU-145, Spring 2013 ;;; Lab 1 Template ;;; Feb. 4, 2013 ;;; ========================================== (load "asmt-helper.txt") (header "lab1" "My Name!") ;;; ------------------------- ;;; PROBLEM 0 ;;; ------------------------- (problem "0: CONS, LIST and APPEND") (tester '(cons 1 1)) (tester '(cons 1 '(1 2))) (tester '(cons '(1 2) 1)) (tester '(cons '(1 2) '(1 2))) ;;; ----------------------------- ;;; PROBLEM 1 ;;; ----------------------------- (problem "1: MAP") (tester '(map even? '(1 2 3 4 5))) (tester '(map (lambda (x) (* x x)) '(1 2 3 4 5))) ;;; ---------------------------------- ;;; PROBLEM 2 ;;; ---------------------------------- (problem "2: LET*") (tester '(let* ((x 2) (y (* x x)) (z (+ x y)) (w (* z 10))) (list x y z w)))