summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-09 06:46:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-09 06:46:06 -0700
commitb2739251281d7f6ef4d30164101bdf2a8d537a72 (patch)
treec7a5263177748b5d82c2086eb6187374a2999f63 /Makefile
parent13bba10fb47fa1b3638021120042641464f0c57a (diff)
downloadtxr-b2739251281d7f6ef4d30164101bdf2a8d537a72.tar.gz
txr-b2739251281d7f6ef4d30164101bdf2a8d537a72.tar.bz2
txr-b2739251281d7f6ef4d30164101bdf2a8d537a72.zip
list-builder: rewrite of basic methods.
Rewriting be addition, pending and nconcing methods of list-builder to avoid loops and rely on lower list processing functions. This cleans up the semantics and error messages. Some examples of behavioral changes: (build (pend "abc") (add #\d)) now returns "abcd", consistent with (append "abc" '(#\d)). Previously it returned '(#\d). (build (add 1) (pend 2) (pend 3)) now produces a "cannot append to 2" error. Previously it produced "copy: cannot copy object of type fixnum". * share/txr/stdlib/build.tl (list-builder add): Don't use copy-list; rather the idiom for copying a sequence in preparation for appending to it is (append x nil). This will blow up nicely if x is an atom other than nil. We use this trick twice. (list-builder add*): Simplify with append. (pend, pend*, ncon): Rewrite. (ncon*): Use nconc once on a combined argument list: this is borrowed from the rewritten pend*. * txr.1: Documentation updated with clarifications, particularly in the area of the requirements regarding destructive manipulation and substructure sharing.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions