;; define.txt (define x 4) x => 4 (define (f x) (+ x 1)) (f 5) => 6 (define (make-adder n) (lambda (x) (+ x n))) (define f (make-adder 10)) (f 5) => 15 ;; rest args (define (f x y z...) (pair x (pair y (pair z... ())))) (f 1 2 3 4 5) => (1 2 (3 4 5)) ;; keyword args (define (f :foo :bar) (pair foo (pair bar ()))) (f) => (#f #f) (f :foo 33) => (33 #f) (f :bar "z" :foo) => (#t "z") (f :foo :bar) => (#t #t) ;; rest args & keywords (define (f x y z... :this :that) (pair x (pair y (pair z... (pair this (pair that ())))))) (f 1 2 3 4 5 :this 100) => (1 2 (3 4 5) 100 #f)