Closures/Value capture: Difference between revisions
Content deleted Content added
added simplified scheme solution |
fixed scheme code to task accordance |
||
Line 1,186: | Line 1,186: | ||
list)) |
list)) |
||
(define list-of-functions (build-list-of-functions |
(define list-of-functions (build-list-of-functions 10 1 '())) |
||
(map (lambda (f) (f)) list-of-functions) |
(map (lambda (f) (f)) list-of-functions) |
||
Line 1,193: | Line 1,193: | ||
{{out}} |
{{out}} |
||
<lang scheme>(1 4 9 16 25 36 49 64 81 |
<lang scheme>'(1 4 9 16 25 36 49 64 81) |
||
81</lang> |
81</lang> |
||