diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-11-11 22:00:41 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-11-11 22:00:41 -0800 |
commit | 25cf62c79c1cc0438636c5d0f16eef4294b1b279 (patch) | |
tree | c7705dd79e3860f95c0e0330f482eb6aaa278934 /checkman.txr | |
parent | 7215b52357ee6cff03ea6c52a2c58f4f21f05add (diff) | |
download | txr-25cf62c79c1cc0438636c5d0f16eef4294b1b279.tar.gz txr-25cf62c79c1cc0438636c5d0f16eef4294b1b279.tar.bz2 txr-25cf62c79c1cc0438636c5d0f16eef4294b1b279.zip |
ref: bugfix in deletion of ref place.
The ref function is not defined in the documentation
as an accessor, but there is a ref place. Unfortunately,
deletion is broken: (del (ref x y)) does not store the
new sequence back into place x, and so it does not work
correctly for lists; if x is a list, it doesn't change.
Various accessors are defined in terms of ref, as place
macros, such as the first, second, third, ... accessors.
This fixes the bug for them also; (del (second list))
must update list.
* stdlib/place.tl (ref): Fix the delete-expander to
fetch the clobber expander of the sequence place,
and use the simple setter to put the edited sequence into
that place.
* tests/012/seq.tl: Test case, which breaks without
this fix. Test the (second ...) place also, which is defined
in terms of ref.
* txr.1: Split documentation for ref and refset, mainly
because one is an Accessor and one is a Function. Removing
some discussions about the equivalences between DWIM brackets
and ref; there are subtleties there not worth going into.
Description of refset is simplified. We mention the possibility
of del over a ref place; only in that case is the sequence
itself required to be a place.
Diffstat (limited to 'checkman.txr')
0 files changed, 0 insertions, 0 deletions