summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-01-20 01:03:51 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-01-20 01:03:51 -0800
commit9a2f9df335393284f6af2d95dbd65cb606792ad8 (patch)
tree3b5879d84420fd384eb788c576658c3dd5a4ef71 /txr.1
parent54d0988406a70c7849a10d9ada1dbdff761adf8f (diff)
downloadtxr-9a2f9df335393284f6af2d95dbd65cb606792ad8.tar.gz
txr-9a2f9df335393284f6af2d95dbd65cb606792ad8.tar.bz2
txr-9a2f9df335393284f6af2d95dbd65cb606792ad8.zip
New function: hash-keys-of.
* hash.c (hash_keys_of): New function. (hash_init): Register hash-keys-of intrinsic * hash.h (hash_keys_of): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.111
1 files changed, 10 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 54550b31..bf1233e2 100644
--- a/txr.1
+++ b/txr.1
@@ -48244,9 +48244,10 @@ to
The function returns
.codn nil .
-.coNP Function @ hash-revget
+.coNP Functions @ hash-revget and @ hash-keys-of
.synb
.mets (hash-revget < hash < value >> [ testfun <> [ keyfun ]])
+.mets (hash-keys-of < hash < value >> [ testfun <> [ keyfun ]])
.syne
.desc
The
@@ -48268,6 +48269,14 @@ If multiple matching entries exist, it is not specified which entry's
key is returned.
The
+.code hash-keys-of
+function has exactly the same argument conventions, and likewise
+searches the
+.metn hash .
+However, it returns a list of all keys whose values match
+.metn value .
+
+The
.meta keyfun
function is applied to each value in
.meta hash