summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-13 00:51:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-13 00:51:53 -0800
commit0757a921ab7db0f15ea703b5f5b185fa5a035ba6 (patch)
treed59be052757997ebdcebe2b99f441ac1ddf17696 /txr.1
parent5cb7b80bc96c4dd7929a8d9ce299af875085a7d2 (diff)
downloadtxr-0757a921ab7db0f15ea703b5f5b185fa5a035ba6.tar.gz
txr-0757a921ab7db0f15ea703b5f5b185fa5a035ba6.tar.bz2
txr-0757a921ab7db0f15ea703b5f5b185fa5a035ba6.zip
hash-symdiff: new function.
* hash.c (hash_symdiff): New function. (hash_init): hash-symdiff intrinsic registered. * hash.h (hash_symdiff): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.122
1 files changed, 21 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index f4242042..7118b588 100644
--- a/txr.1
+++ b/txr.1
@@ -41549,10 +41549,11 @@ dohash early using
or
.codn (return) .
-.coNP Functions @, hash-uni @ hash-diff and @ hash-isec
+.coNP Functions @, hash-uni @, hash-diff @ hash-symdiff and @ hash-isec
.synb
.mets (hash-uni < hash1 < hash2 <> [ join-func ])
.mets (hash-diff < hash1 << hash2 )
+.mets (hash-symdiff < hash1 << hash2 )
.mets (hash-isec < hash1 < hash2 <> [ join-func ])
.syne
.desc
@@ -41616,6 +41617,25 @@ in
are deleted.
The
+.code hash-symdiff
+function performs a symmetric difference. A new hash is returned which
+contains all of the keys from
+.meta hash1
+that are not in
+.meta hash2
+and
+.IR "vice versa" :
+all of the keys from
+.meta hash2
+that are not in
+.metn hash1 .
+The keys carry their corresponding values from
+.meta hash1
+and
+.metn hash2 ,
+respectively.
+
+The
.code hash-isec
function performs a set intersection. The resulting hash contains
only those keys which occur both in