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 | 95abf5aa1cb792bdcb472399d1ef9dfc9b9088e0 (patch) | |
tree | cee4aa265847e90423d1cc49930b9c5178a9124c | |
parent | 487fab6410649f4799c48dba08a05dd7a0ce2c1b (diff) | |
download | txr-95abf5aa1cb792bdcb472399d1ef9dfc9b9088e0.tar.gz txr-95abf5aa1cb792bdcb472399d1ef9dfc9b9088e0.tar.bz2 txr-95abf5aa1cb792bdcb472399d1ef9dfc9b9088e0.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) |