;; UMBC CMSC 331 Fall 2011, HW6, YOUR NAME, YOUR_USERNAME@UMBC.EDU (define (pass) null) ;; (1) Enigma: put your answer to problem one as a comment here. User ;; as many lines as you need (define (enigma x) ;; the enigma function ... (or (null? x) (null? (rest x)) (and (not (equal? (car x) (car (cdr x)))) (enigma (rest x))))) ;; (2) connumdrum put your answer to problem two as a comment here. ;; User as many lines as you need. (define (conundrum x y) ;; The amazing function conundrum ... (cond ((null? y) -1) ((equal? x (first y)) 0) (else (let ((z (conundrum x (rest y)))) (if (< z 0) z (+ 1 z)))))) ;; (3.1) unedit the following line and complete it to give your answer ;; (define L1 (lambda ...)) ;; (3.2) unedit the following line and complete it to give your answer ;; (define L2 (lambda ...)) ;; (3.3) unedit the following line and complete it to give your answer ;; (define L3 (lambda ...)) ;; complete the following as answers to the remaining problems. add ;; as many additional functions as needed. Please add appropriate ;; comments to your functions. ;; (6) unique-atoms (define (unique-atoms s) ;; given an s-expression s, returns a list of the unique atoms in s. ;; The order is not important. e.g.: (unique-atoms? '(a a)) => (a), ;; (unique-atoms? '(a (b (c (a))))) => (a b c), (unique-atoms? '()) ;; => () (pass))