diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-01-24 07:30:00 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-01-24 07:30:00 -0800 |
commit | 24f50b052eb8f8fe3a37d60d0a9e6daebab7f84a (patch) | |
tree | 69b708e12a8cff8a2c100e0b8e76d84a93fa7c80 /txr.1 | |
parent | 21ecebc20e45132bd1c78fd5392b5f6523e4c9e6 (diff) | |
download | txr-24f50b052eb8f8fe3a37d60d0a9e6daebab7f84a.tar.gz txr-24f50b052eb8f8fe3a37d60d0a9e6daebab7f84a.tar.bz2 txr-24f50b052eb8f8fe3a37d60d0a9e6daebab7f84a.zip |
* hash.c (hash_update): New function.
* hash.h (hash_update): Declared.
* lib.c (update): New function.
* lib.h (update): Declared.
* eval.c (eval_init): Register hash_update and update as intrinsics.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -8847,6 +8847,22 @@ can be used in functional programming as higher order functions, whereas the bracket notation is syntactic sugar, and set is an operator, not a function. Therefore the brackets cannot replace all uses of ref and refset. +.SS Function update + +.TP +Syntax: + + (update <sequence-or-hash> <function>) + +.TP +Description: + +The update function replaces each elements in a sequence, or each value +in a hash table, with the value of <function> applied to that element +or value. + +The sequence or hash table is returned. + .SS Function sort .TP @@ -9788,6 +9804,21 @@ the equal function instead. In addition to storing key-value pairs, a hash table can have a piece of information associated with it, called the user data. +.SS Function hash-update + +.TP +Syntax: + + (hash-update <hash> <function>) + +.TP +Description: + +The update function replaces each values in <hash>, with the value of +<function> applied to that value. + +The return value is <hash>. + .SS Function group-by .TP |