summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-06-23 22:22:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-06-23 22:22:13 -0700
commite65fc7cc213436bba321a9b616bb77874b2a789a (patch)
treea1f6c1ca19b1aa1d865e2a985b14d0ec093f1a1c /eval.c
parent742b9e4d64a178578476894636bf94911738d957 (diff)
downloadtxr-e65fc7cc213436bba321a9b616bb77874b2a789a.tar.gz
txr-e65fc7cc213436bba321a9b616bb77874b2a789a.tar.bz2
txr-e65fc7cc213436bba321a9b616bb77874b2a789a.zip
Hash subset testing.
* eval.c (eval_init): Register hash-subset and hash-proper-subset intrinsics. * hash.c (hash_subset, hash_proper_subset): New functions. * hash.h (hash_subset, hash_proper_subset): Declared. * txr.1: New functions documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 7d1ef1ae..c61b1460 100644
--- a/eval.c
+++ b/eval.c
@@ -4272,6 +4272,8 @@ void eval_init(void)
reg_fun(intern(lit("hash-uni"), user_package), func_n3o(hash_uni, 2));
reg_fun(intern(lit("hash-diff"), user_package), func_n2(hash_diff));
reg_fun(intern(lit("hash-isec"), user_package), func_n3o(hash_isec, 2));
+ reg_fun(intern(lit("hash-subset"), user_package), func_n2(hash_subset));
+ reg_fun(intern(lit("hash-proper-subset"), user_package), func_n2(hash_proper_subset));
reg_fun(intern(lit("group-by"), user_package), func_n2v(group_by));
reg_fun(intern(lit("sort-group"), user_package), func_n3o(sort_group, 1));
reg_fun(intern(lit("unique"), user_package), func_n2ov(unique, 1));