length:
(define (my-length lst) (if (empty? lst) 0 (+ (my-length (rest lst)) 1)))
map:
(define (my-map f lst) (if (empty? lst) empty (cons (f (first lst)) (my-map f (rest lst))) ))
length:
(define (my-length lst) (if (empty? lst) 0 (+ (my-length (rest lst)) 1)))
map:
(define (my-map f lst) (if (empty? lst) empty (cons (f (first lst)) (my-map f (rest lst))) ))
转载于:https://www.cnblogs.com/fcyworld/p/7806061.html