diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-04 10:22:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-04 10:22:08 -0700 |
commit | 75ddca922ba8dcaf696f23f613b1a9f594a1884f (patch) | |
tree | 2792a86030426b5e170edfc4acd294e218d8a987 /tests | |
parent | 0b587e521b5bee74c530adcf4636993ed91036c4 (diff) | |
download | txr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.tar.gz txr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.tar.bz2 txr-75ddca922ba8dcaf696f23f613b1a9f594a1884f.zip |
Optional arguments in boa construction.
* share/txr/stdlib/struct.tl (defstruct): Split boa
arguments on colon and generate the lambda
accordingly. The generated function detects which
optional arguments are actually present and only
performs the slot updates for those.
* tests/012/struct.tl: Corrected boa test case.
* txr.1: Documented.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/012/struct.tl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/012/struct.tl b/tests/012/struct.tl index 209bae71..d9ecc325 100644 --- a/tests/012/struct.tl +++ b/tests/012/struct.tl @@ -94,8 +94,8 @@ (test (new (boa 1 2)) #S(boa x 1 y 2)) (test (new (boa 1 2) x 10 y (+ 10 10)) - #S(boa x 10 y 20)) -(test (new boa x 10 y 20) + #S(boa x 1 y 2)) +(test (new boa x 10 y (+ 10 10)) #S(boa x 10 y 20)) (defstruct baz nil |