;; this is map (define (map1 f l) (if (null? l) () (cons (f (car l)) (map1 f (cdr l))))) ;; this version uses list instead of cons ;; (it doesn't work right) (define (map1-bad f l) (if (null? l) () (list (f (car l)) (map1 f (cdr l))))) Welcome to DrScheme, version 205. Language: Standard (R5RS). > (map1 abs '(3 -7 9 1 -17)) (3 7 9 1 17) > (map1-bad abs '(3 -7 9 1 -17)) (3 (7 (9 (1 (17 ()))))) > (cons 3 '(5)) (3 5) > (list 3 '(5)) (3 (5)) ;; built-in scheme takes multiple lists > (map + '(1 5 7) '(3 4 5)) (4 9 12) ;; you need to pass a function that takes the right ;; number of args to map -- we see that abs doesn't take ;; two args, and what follows if we pass it to map ;; with two lists... > (abs 3 5) . abs: expects 1 argument, given 2: 3 5 > (map abs '(1 5 7) '(3 4 5)) . map: arity mismatch for abs: expects 1 argument, given 2