2017-02-27 12:00:24 -05:00
|
|
|
---
|
|
|
|
Test
|
|
|
|
---
|
2017-03-02 16:36:23 -05:00
|
|
|
A simple lexical closure.
|
|
|
|
|
2017-02-27 12:00:24 -05:00
|
|
|
| script | lisp interpreter fixture |
|
2017-02-27 13:34:04 -05:00
|
|
|
| show | evaluate | (defun adderx (x) (lambda (y) (+ x y))) |
|
|
|
|
| show | evaluate | (setf adder20 (adderx 20)) |
|
2017-02-27 12:00:24 -05:00
|
|
|
| check | evaluate | (funcall adder20 2) | 22 |
|