;; This is an example of defining our own syntax in Scheme. I'd like a currying form ;; (fun x ... -> e1 ...) ==> (lambda (x) e1 ...). Here goes: (define-syntax fun (syntax-rules (->) [(fun -> e1 ...) (lambda () e1 ...)] [(fun x rest ...) (lambda (x) (process-fun-rest rest ...))])) (define-syntax process-fun-rest (syntax-rules (->) [(process-fun-rest -> e1 ...) (begin e1 ...)] [(process-fun-rest x x2 ...) (lambda (x) (process-fun-rest x2 ...))])) (define (test) ;; For example: (define f (fun x y z -> (printf "hello, here's what you entered: ~a ~a ~a~%" x y z) (values x y z))) (((f 3) 4) 5)) ;; How do we make it so that the user isn't aware of process-fun-rest?