summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-13 06:24:25 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-13 06:24:25 -0800
commitdabd00c6f02b73c43cdf8c4ec760092cc5a04268 (patch)
tree5855d661cc340c184e4c7fce2db61a000f4759ea /txr.1
parent0757a921ab7db0f15ea703b5f5b185fa5a035ba6 (diff)
downloadtxr-dabd00c6f02b73c43cdf8c4ec760092cc5a04268.tar.gz
txr-dabd00c6f02b73c43cdf8c4ec760092cc5a04268.tar.bz2
txr-dabd00c6f02b73c43cdf8c4ec760092cc5a04268.zip
hash-from-alist: new function.
* hash.c (hash_from_alist_v): New function. (hash_init): Register hash-from-alist intrinsic. * hash.h (hash_from_alist_v): Declared. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.118
1 files changed, 17 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 7118b588..658fbad0 100644
--- a/txr.1
+++ b/txr.1
@@ -40769,10 +40769,11 @@ function is affected or its hash value under
is altered, the behavior of subsequent lookup and insertion operations on the
becomes unspecified.
-.coNP Functions @ hash-construct and @ hash-from-pairs
+.coNP Functions @, hash-construct @ hash-from-pairs and @ hash-from-alist
.synb
.mets (hash-construct < hash-args << key-val-pairs )
.mets (hash-from-pairs < key-val-pairs << hash-arg *)
+.mets (hash-from-alist < alist << hash-arg *)
.syne
.desc
The
@@ -40800,6 +40801,21 @@ argument is first, and the
.meta hash-args
are passed as trailing variadic arguments, rather than a single list argument.
+The
+.code hash-from-alist
+function is similar to
+.codn hash-from-pairs ,
+except that the
+.meta alist
+argument specifies they keys and values as an association list.
+The elements of the list are
+.code cons
+cells, each of whose
+.code car
+is a key, and whose
+.code cdr
+is the value.
+
.coNP Function @ hash-list
.synb
.mets (hash-list < key-list << hash-arg *)