;;; X is a list, Y and Z are numbers: (define (f1 x y z) (cons 'a (append x '(b c) (list (+ y 1) (car x) (+ z 1) 'd)))) ;;; x is a number (define (f2 x) (list 'a x (list 'b (+ x 1) 'c (+ x 2) 'd) 'e (+ x 4))) ;;; x is a list (define (f3 x) (cons x x))
;;; x is a list, y and z are numbers (define (f4 x y z) `(x y z ,x ,y ,z p d q ,@x ,(+ y z) (+ ,y ,z) ,(cdr x))) ;;; x is a list (define (f5 x) `(1 ,@x 2 ,@x 3 ,@x 4)) ;;; x is a number (define (f6 x) `(x is ,x which is half of ,(* x 2)))