Implementation of Curried Functions in Scheme
问题 What happens when I do the following? (define ((func x) y) (if (zero? y) ((func x) 1) 12)) I understand that I can do this: (define curried (func 5)) And now I can use curried. What I'm curious about is in the definition of the function. Does the line ((func x) 1) create a new lambda with x as the argument, and then invoke it on 1? Or is it smarter than that and it just re-uses the existing one. (For example, if I do (curried 0) , the ((func x) 1) line would be equivalent to (curried 1) -