;; IN: a list, an unary-function ;; OUT: list that results by applying input function on ;; every element of input list (define (map fn ls) (if (null? ls) '() (cons (fn (car ls)) (map fn (cdr ls)))))