我对闭包有点麻烦,我想知道规范的make-adder过程的等效代码在Ruby中是什么.
在计划中它将是:
(define (make-adder n) (lambda (x) (+ x n))
ruby closures
closures ×1
ruby ×1