| The function curry-generalized. | Lecture 4 - slide 24 : 34 Program 1 |
(define (curry-generalized f)
(lambda rest
(cond ((= (length rest) 1)
(lambda lst (apply f (cons (car rest) lst))))
((>= (length rest) 2)
(apply f (cons (car rest) (cdr rest)))))))