diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-25 13:09:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-25 13:09:30 -0700 |
commit | 99aea60f265cd70597d3c59142500956ed15fec6 (patch) | |
tree | cee4aa265847e90423d1cc49930b9c5178a9124c | |
parent | c6648df0dabeb99e1ea7ca84144e781c457d95ce (diff) | |
download | txr-99aea60f265cd70597d3c59142500956ed15fec6.tar.gz txr-99aea60f265cd70597d3c59142500956ed15fec6.tar.bz2 txr-99aea60f265cd70597d3c59142500956ed15fec6.zip |
nthcdr place bugfix: wrong return value.
* share/txr/stdlib/place.tl (defplace nthcdr): In the case
when list is a place, the setter operation returns the
wrong value: the entire list, rather than the value assigned.
-rw-r--r-- | share/txr/stdlib/place.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/place.tl b/share/txr/stdlib/place.tl index acb17886..198dbb19 100644 --- a/share/txr/stdlib/place.tl +++ b/share/txr/stdlib/place.tl @@ -467,7 +467,7 @@ (,parent-cell-sym (nthcdr ,index-sym ,sentinel-head-sym))) (macrolet ((,getter () ^(cdr ,',parent-cell-sym)) (,setter (val) - ^(progn (sys:rplacd ,',parent-cell-sym ,val) + ^(prog1 (sys:rplacd ,',parent-cell-sym ,val) (,',lsetter (cdr ,',sentinel-head-sym))))) ,body)))) ^(alet ((,index-sym ,index) |