diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-03-19 22:41:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-19 22:41:26 -0700 |
commit | c0e5857c181d39e7de1eeff71f60800a6b6861dc (patch) | |
tree | fd12de8a5fee7c858a85f49a341bc6358e76eb0e /txr.1 | |
parent | 7c40d5d6ef6832baed4a5ccd0a5d4235ed4f5ee3 (diff) | |
download | txr-c0e5857c181d39e7de1eeff71f60800a6b6861dc.tar.gz txr-c0e5857c181d39e7de1eeff71f60800a6b6861dc.tar.bz2 txr-c0e5857c181d39e7de1eeff71f60800a6b6861dc.zip |
hash-uni: two new arguments for projecting values.
* hash.c (hash_uni): New functional argument map1fun and
map2fun. If present, values from hash1 and hash2,
respectively, are projected through these functions.
(hash_init): hash-uni registration updated.
* hash.h (hash_uni): Declaration updated.
* txr.1: Documented new arguments.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -45819,7 +45819,7 @@ or .coNP Functions @, hash-uni @, hash-diff @ hash-symdiff and @ hash-isec .synb -.mets (hash-uni < hash1 < hash2 <> [ joinfun ]) +.mets (hash-uni < hash1 < hash2 >> [ joinfun >> [ map1fun <> [ map2fun ]]]) .mets (hash-diff < hash1 << hash2 ) .mets (hash-symdiff < hash1 << hash2 ) .mets (hash-isec < hash1 < hash2 <> [ joinfun ]) @@ -45872,6 +45872,19 @@ and .metn hash2 . The return value of this function is used as the value in the union hash. +If +.meta map1fun +is specified it must be a function that can be called with one +argument. All values from +.meta hash1 +are projected through this function: the function is applied +to each value, and the function's return value is used +in place of the original value. +Similarly, if +.meta map2fun +is present, specifies a function through which values from +.meta hash2 +are projected. The .code hash-diff |