Currying in Scheme
(define (curry-binary-fn f firstarg)
(lambda (x) (f firstarg x)) )
(define cons-with-john
(curry-binary-fn cons ’john) )
(cons-with-john 21)
=> (21 . JOHN)
Previous slide
Next slide
Back to first slide
View graphic version