summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-23 20:32:39 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-23 20:32:39 -0700
commit96e0815b2838becd739d471c5e0edb7e3dac46fc (patch)
treee6acc6d2a9bb4e7766b26347327695b2fbe2a601 /txr.1
parent0ccb63709201223f00365b7ee99d3ef9aa5304d2 (diff)
downloadtxr-96e0815b2838becd739d471c5e0edb7e3dac46fc.tar.gz
txr-96e0815b2838becd739d471c5e0edb7e3dac46fc.tar.bz2
txr-96e0815b2838becd739d471c5e0edb7e3dac46fc.zip
make-like: use seq_build.
* lib.c (make_like): Simplify implementation using seq_build, which also lets it handle more cases. * tests/012/seq.tl: New tests. Some existing test fixed, including one for tuples*. * txr.1: Documentation updated: mainly that make-like doesn't strictly require a list argument.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.114
1 files changed, 7 insertions, 7 deletions
diff --git a/txr.1 b/txr.1
index a5fb51fa..a92a484a 100644
--- a/txr.1
+++ b/txr.1
@@ -34410,22 +34410,22 @@ of the language may specify additional iterable objects.
.coNP Functions @ make-like and @ seq-like
.synb
-.mets (make-like < list << object )
+.mets (make-like < seq << object )
.mets (seq-like < object << arg *)
.syne
.desc
The
.code make-like
function's
-.meta list
-argument must be a list. If
+.meta seq
+argument must be a sequence. If
.meta object
is a sequence type,
then
.meta list
is converted to the same type of sequence, if possible, and returned.
Otherwise the original
-.meta list
+.meta seq
is returned.
Conversion is supported to string and vector type, plus
@@ -34438,7 +34438,7 @@ is an object of a structure type which has a static function
then
.code make-like
calls that function, passing to it, and the resulting value is returned.
-.meta list
+.meta seq
and returns whatever value that function returns.
If
@@ -34484,10 +34484,10 @@ The result of
.code seq-like
is consistent with what the
.code make-like
-function would return if given a list of the
+function would return if given a sequence of the
.meta arg
values as the
-.meta list
+.meta seq
argument. That is to say, the following equivalence holds:
.verb