summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-23 20:45:54 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-23 20:45:54 -0800
commit026acf026747478ed25f20671b43c084dd0cbff8 (patch)
treef9cf51f253ce4e572e3a5872d0700ff69bf03a2e /txr.1
parent7394c87e3cc11fdb0b7df884603b183df1c41eda (diff)
downloadtxr-026acf026747478ed25f20671b43c084dd0cbff8.tar.gz
txr-026acf026747478ed25f20671b43c084dd0cbff8.tar.bz2
txr-026acf026747478ed25f20671b43c084dd0cbff8.zip
Adding clearhash function.
This is needed for an upcoming bugfix, so why not expose it as an intrinsic. * hash.c (clearhash): New function. (hash_init): clearhash intrinsic registered. * hash.h (clearhash): Declared. * txr.1: Documented clearhash.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.121
1 files changed, 21 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 2effcf39..9376d51a 100644
--- a/txr.1
+++ b/txr.1
@@ -34998,6 +34998,27 @@ is returned. Otherwise
.code nil
is returned.
+.coNP Function @ clearhash
+.synb
+.mets (clearhash << hash )
+.syne
+.desc
+The
+.code clearhash
+function removes all keys-value pairs from
+.metn hash ,
+causing it to be empty.
+
+If
+.meta hash
+is already empty prior to the operation, then
+.codn nil ,
+is returned.
+
+Otherwise an integer is returned indicating the number of entries
+that were purged from
+.metn hash .
+
.coNP Function @ hash-count
.synb
.mets (hash-count << hash )