summaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-10 06:46:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-10 06:46:53 -0800
commite52438a4ff3e470863b3122cfd46a95c3a417516 (patch)
treee75088d5ac403a61c539a6916823cd8767b971db /hash.h
parent1b033ba4d434efc0c1d55c33305b686338eb5f50 (diff)
downloadtxr-e52438a4ff3e470863b3122cfd46a95c3a417516.tar.gz
txr-e52438a4ff3e470863b3122cfd46a95c3a417516.tar.bz2
txr-e52438a4ff3e470863b3122cfd46a95c3a417516.zip
New function: group-reduce.
* eval.c (eval_init): Register group-reduce intrinsic. * hash.c (group_reduce): New function. * hash.h (group_reduce): Declared. * txr.1: Documented group-reduce.
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hash.h b/hash.h
index a8d9de4d..0d5d2ffe 100644
--- a/hash.h
+++ b/hash.h
@@ -52,6 +52,8 @@ val hash_construct(val hashl_args, val pairs);
val hash_from_pairs_v(val pairs, struct args *hashv_args);
val hash_list(val keys, struct args *hashv_args);
val group_by(val func, val seq, struct args *hashv_args);
+val group_reduce(val hash, val by_fun, val reduce_fun, val seq,
+ val initval, val filter_fun);
val hash_keys(val hash);
val hash_values(val hash);
val hash_pairs(val hash);