summaryrefslogtreecommitdiffstats
path: root/vm.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-28 19:26:44 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-28 19:26:44 -0800
commita1bab9c5e9cfeb780f75fe5d363c22bdc193dcce (patch)
treefe921a44186d15eb69631f6c5cce6c66d0b1e00b /vm.h
parent6ddb270dcac7bc40a5f15a00fcbb035ee9c78286 (diff)
downloadtxr-a1bab9c5e9cfeb780f75fe5d363c22bdc193dcce.tar.gz
txr-a1bab9c5e9cfeb780f75fe5d363c22bdc193dcce.tar.bz2
txr-a1bab9c5e9cfeb780f75fe5d363c22bdc193dcce.zip
compiler: fix broken inline lambda.
* share/txr/stdlib/compiler.tl (lambda-apply-transform): Fix failure to bind the additional expresions to the rest variable, causing a too many arguments error to be reported. That is ((lambda (. x)) 1) would fail to compile. When binding the trailing fixed arguments to rest, we also pull in the apply list; this matches interpreted behavior, for instance ((lambda (a . b) (list a b)) 1 2 . 3) must return (1 (2 . 3)). In this case, the 3 comes into this function as (3) via the apply-list-expr argument; if we don't include that and bind only the remaining fix-args, then we get the output (1 (2)).
Diffstat (limited to 'vm.h')
0 files changed, 0 insertions, 0 deletions