diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-22 13:44:38 -0400 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-22 13:44:38 -0400 |
commit | 70a3b3ae47671a8a73ac517cd7c3f6a4bce782e5 (patch) | |
tree | b0fbceca521bf6ba1fe381999f9239d69a598ee3 /lib.h | |
parent | 6729d88a6f8f5fc1ae4ea07b96a979bb6ca71ee8 (diff) | |
download | txr-70a3b3ae47671a8a73ac517cd7c3f6a4bce782e5.tar.gz txr-70a3b3ae47671a8a73ac517cd7c3f6a4bce782e5.tar.bz2 txr-70a3b3ae47671a8a73ac517cd7c3f6a4bce782e5.zip |
Task #11474
* filter.c (filter_equal): New function.
(upcase_k, downcase_k): New keyword variables.
(filter_init): New keyword variables initialized,
and new upcase and downcase filters registered.
* filter.h (filter_equal): Declared.
* lib.c (tree_find): Takes new argument, the equality test function.
(upcase_str, downcase_str): New functions.
(do_curry_123_23): New static function.
(curry_123_23): New function.
* lib.h (tree_find): Declaration updated.
(upcase_str, downcase_str, curry_123_23): Declared.
* match.c (dest_bind): Updated to take equality function.
Uses it and passes it down to tree_find.
(v_bind): Filter feature implemented.
(h_var, v_try): Add equal_f to dest_bind argument list.
* txr.1: Updated to describe new filters and bind arguments.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -296,7 +296,7 @@ val ldiff(val list1, val list2); val flatten(val list); val memq(val obj, val list); val memqual(val obj, val list); -val tree_find(val obj, val tree); +val tree_find(val obj, val tree, val testfun); val some_satisfy(val list, val pred, val key); val all_satisfy(val list, val pred, val key); val none_satisfy(val list, val pred, val key); @@ -336,6 +336,8 @@ val mkstring(val len, val ch); val mkustring(val len); /* must initialize immediately with init_str! */ val init_str(val str, const wchar_t *); val copy_str(val str); +val upcase_str(val str); +val downcase_str(val str); val string_extend(val str, val tail); val stringp(val str); val lazy_stringp(val str); @@ -388,6 +390,7 @@ val reduce_left(val fun, val list, val init, val key); val curry_12_2(val fun2, val arg); val curry_12_1(val fun2, val arg2); val curry_123_2(val fun3, val arg1, val arg3); +val curry_123_23(val fun3, val arg1); val chain(val first_fun, ...); val andf(val first_fun, ...); val vector(val alloc); |