gerbil-poo
gerbil-poo copied to clipboard
Lexical scoping for slot-names
Failing test: See https://github.com/fare/gerbil-poo/compare/noel/slot-name-bug?expand=1
This will recursively evaluate the slot x
to itself. Hence we will be stuck trying to define o
.
Workaround - use the lexical scoping pattern mentioned in poo.md
:
(let ((x 1) (y 2))
(.def point (x) (y))
(assert-equal! (map (cut .ref point <>) '(x y)) [1 2]))