Anonymous user
Closures/Value capture: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 728:
=={{header|Scheme}}==
<lang scheme>
(define (build-list-of-functions n i list)
(if (< i n)
(build-list-of-functions n (+ i 1) (cons (lambda () (* (- n i) (- n i))) list))
|