diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-06-23 22:22:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-06-23 22:22:13 -0700 |
commit | e65fc7cc213436bba321a9b616bb77874b2a789a (patch) | |
tree | a1f6c1ca19b1aa1d865e2a985b14d0ec093f1a1c /eval.c | |
parent | 742b9e4d64a178578476894636bf94911738d957 (diff) | |
download | txr-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)); |