summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-15 06:48:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-15 06:48:11 -0700
commit5a09b244c77dbf498a4bdf7a9381d2741ce87055 (patch)
tree19c02de1d17eb709ec77b8458c7c679fc705b562 /txr.1
parenta3c8effa1337c16e9c7832bf1fb4e66f72e5c3c8 (diff)
downloadtxr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.tar.gz
txr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.tar.bz2
txr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.zip
key function argument on remq, remql and remqual.
* eval.c (weave_while): Pass third arg to remq as nil. (eval_init): Update registrations of remq, remql and remqual. * lib.c (remq, remql, remqual): Implement key function argument. * lib.h (remq, remql, remqual): Declarations updated. * sysif.c (at_exit_call): Pass third arg to remq as nil. * debug.c (debug): Pass third argument to remqual as nil. * txr.1: Documentation updated.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.125
1 files changed, 18 insertions, 7 deletions
diff --git a/txr.1 b/txr.1
index 72607129..e524dbce 100644
--- a/txr.1
+++ b/txr.1
@@ -22429,9 +22429,9 @@ The sequence or hash table is returned.
.coNP Functions @, remq @ remql and @ remqual
.synb
-.mets (remq < object << list )
-.mets (remql < object << list )
-.mets (remqual < object << list )
+.mets (remq < object << list <> [ key-function ])
+.mets (remql < object << list <> [ key-function ])
+.mets (remqual < object << list <> [ key-function ])
.syne
.desc
The
@@ -22441,7 +22441,7 @@ and
.code remqual
functions produce a new list based on
.metn list ,
-removing the items which are
+removing the elements whose associated keys are
.codn eq ,
.code eql
or
@@ -22457,11 +22457,22 @@ is
.meta list
itself.
+If
+.meta key-function
+is omitted, then the element keys compared to
+.meta object
+are the elements themselves.
+Otherwise,
+.meta key-function
+is applied to each element and the resulting value
+is that element's key which is compared to
+.metn object .
+
.coNP Functions @, remq* @ remql* and @ remqual*
.synb
-.mets (remq* < object << list )
-.mets (remql* < object << list )
-.mets (remqual* < object << list )
+.mets (remq* < object < list )
+.mets (remql* < object < list )
+.mets (remqual* < object < list )
.syne
.desc
The