summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-10 18:04:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-10 18:04:09 -0700
commite67fa3aea4dff978584778ddd782f2548e7c49cc (patch)
tree5efbeee3dac2f31244d28d45e3fdf9c9f957c031
parent30d8e9cd89579c557666e2552ce93ed78165ef1b (diff)
downloadtxr-e67fa3aea4dff978584778ddd782f2548e7c49cc.tar.gz
txr-e67fa3aea4dff978584778ddd782f2548e7c49cc.tar.bz2
txr-e67fa3aea4dff978584778ddd782f2548e7c49cc.zip
doc: partition, split, split*: clarifications about indices
* txr.1: Clarify what repeated values mean in partition, since they are allowed. For split/split*, clarify that indice have to be strictly increasing after negative indicates are displaced by the sequence length, and that the behavior is unspecified otherwise.
-rw-r--r--txr.114
1 files changed, 12 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index c18ee4ce..587874a9 100644
--- a/txr.1
+++ b/txr.1
@@ -37204,8 +37204,10 @@ to its value. The sequence index positions thus denoted by
shall be strictly nondecreasing. Each successive element
is expected to designate an index position at least as high
as all previous elements, otherwise the behavior is unspecified.
-Leading index positions which are (still) negative, or zero, are effectively
-ignored.
+Index values which are still negative after the addition of the
+sequence length are ignored, as are index values greater than
+the sequence length. Nondecreasing means that repeated values
+are permitted; they have the same effect as a single value.
If
.meta index-seq
@@ -37310,6 +37312,14 @@ as the corresponding arguments of the
function, with the following difference: the index positions indicated by
.code index-seq
are required to be strictly increasing, rather than nondecreasing.
+As with
+.codn partition ,
+this consideration applies to the transformed indices, after the
+displacement of negative values by the length of the sequence.
+If any element of
+.meta index-seq
+is not higher than the previous element, the behavior is unspecified.
+
If the second argument is of the form
.metn index-seq ,