summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-16 10:12:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-16 10:12:30 -0700
commit0313d64f0a3c1b172c819c5515c56a038497bb0c (patch)
tree65a1892050dadc640f09187776b3e38e38129f24
parent41416df7141e0b48e39511710ad176e8f156674c (diff)
downloadtxr-0313d64f0a3c1b172c819c5515c56a038497bb0c.tar.gz
txr-0313d64f0a3c1b172c819c5515c56a038497bb0c.tar.bz2
txr-0313d64f0a3c1b172c819c5515c56a038497bb0c.zip
doc: improvements in sub + replace variants.
* txr.1: The wording is improved in the description of sub-list, replace-list and all the other type specific specializations of sub and replace. We avoid starting the descriptions with "This function", and vague wording such as "is like the sub function". Superfluous, obvious text like "for a description of the semantics, see the sub function" is removed. Also we avoid saying that the sub-list and replace-list functions operate strictly on lists, since they in fact operate on anything that supports list operations.
-rw-r--r--txr.177
1 files changed, 34 insertions, 43 deletions
diff --git a/txr.1 b/txr.1
index 38fc5a52..4cb5473c 100644
--- a/txr.1
+++ b/txr.1
@@ -19031,14 +19031,16 @@ because the latter is equivalent to
.mets (sub-list < list >> [ from <> [ to ]])
.syne
.desc
-This function is like the
-.code sub
-function, except that it operates
-strictly on lists.
-
-For a description of the arguments and semantics, refer to the
+The
+.code sub-list
+function has the same parameters and semantics as the
.code sub
-function.
+function, except that it operates on its
+.meta list
+argument using list operations, and assumes that
+.meta list
+it is terminated by
+.codn nil .
.coNP Function @ replace-list
.synb
@@ -19047,12 +19049,16 @@ function.
.desc
The
.code replace-list
-function is like the replace function, except that the first
-argument must be a list.
-
-For a description of the arguments, semantics and return value, refer to the
+function is like the
.code replace
-function.
+function, except that it operates on its
+.meta list
+argument using list operations. It assumes that
+.meta list
+it is terminated by
+.codn nil ,
+and that it is made of cells which can be mutated using
+.codn rplaca .
.coNP Functions @ listp and @ proper-list-p
.synb
@@ -22004,13 +22010,11 @@ exactly like match-str.
.desc
The
.code sub-str
-function is like the more generic function
-.codn sub ,
-except that it
-operates only on strings. For a description of the arguments and semantics,
-refer to the
+function has the same parameters and semantics as the
.code sub
-function.
+function,
+function, except that the first argument is operated upon
+using string operations.
.coNP Function @ replace-str
.synb
@@ -22019,14 +22023,10 @@ function.
.desc
The
.code replace-str
-function is like the
+function has the same parameters and semantics as the
.code replace
-function, except that the first
-argument must be a string.
-
-For a description of the arguments, semantics and return value, refer to the
-.code replace
-function.
+function, except that the first argument is operated upon
+using string operations.
.coNP Function @ cat-str
.synb
@@ -23393,14 +23393,12 @@ and containing the same elements in the same order.
.desc
The
.code sub-vec
-function is like the more generic function
+function has the same parameters and semantics as the
+function
.codn sub ,
-except that it
-operates only on vectors.
-
-For a description of the arguments and semantics, refer to the
-.code sub
-function.
+except that the
+.meta vec
+argument must be a vector.
.coNP Function @ replace-vec
.synb
@@ -23411,12 +23409,9 @@ The
.code replace-vec
is like the
.code replace
-function, except that the first argument
-must be a vector.
-
-For a description of the arguments, semantics and return value, refer to the
-.code replace
-function.
+function except that the
+.meta vec
+argument must be a vector.
.coNP Function @ cat-vec
.synb
@@ -59571,10 +59566,6 @@ function, except that the first argument must be a buffer.
The extracted sub-range of a buffer is itself a buffer object.
-For a description of the arguments and semantics, refer to the
-.code sub
-function.
-
.coNP Function @ replace-buf
.synb
.mets (replace-buf < buf < item-sequence >> [ from <> [ to ]])
@@ -65062,7 +65053,7 @@ function is a specialized version of
.code replace
which works on
.code carray
-objects. It replaces a sub-range of
+objects. It replaces a sub-range of
.meta carray
with elements from
.metn item-sequence .