mit-scheme-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Currying and binding question


From: Nicholas Papadonis
Subject: Currying and binding question
Date: Wed, 2 Dec 2020 11:34:32 -0500

Does function application and variable binding not appear in (pp <>) output?  I'm trying to understand why (lambda (c))'s variables are not bound.  Thanks

(define-syntax curry
  (syntax-rules ()
    ((_ (a) body ...) 
     (lambda (a) body ...))
    ((_ (a b ...) body ...)
     (lambda (a) (curry (b ...) body ...)))))

((((curry (a b c) (+ a b c)) 1) 1) 1)
;Value: 3

(pp (((curry (a b c) (+ a b c)) 1) 1))
(lambda (c)
  (+ a b c))
;Unspecified return value

reply via email to

[Prev in Thread] Current Thread [Next in Thread]