From c6de88f486896be891e73009dbe2ea0411bf89e1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Sat, 22 Oct 2011 20:02:45 -0400 Subject: Task #11474 * filter.c (filter_equal): Takes two filters instead of one. (lfilt_k, rfilt_k): New keyword variables. (filter_init): New keyword variables initialized. * filter.h (filter_equal): Declaration updated. (lfilt_k, rfilt_k): Declared. * lib.c (funcall4): New function. (do_curry_1234_34): New static function. (curry_1234_34): New function. (do_swap_12_21): New static function. (swap_12_21): New function. * lib.h (funcall4, curry_1234_34, swap_12_21): Declared. * match.c (dest_bind): Swap use the function argument swapping combinator when calling tree find such that the value being searched is on the left and pattern material is on the right. (v_bind): Implemented :lfilt and :rfilt. * txr.1: Documented :lfilt and :rfilt. --- lib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib.h') diff --git a/lib.h b/lib.h index 8cbeb8e5..76ff65df 100644 --- a/lib.h +++ b/lib.h @@ -383,6 +383,7 @@ val funcall(val fun); val funcall1(val fun, val arg); val funcall2(val fun, val arg1, val arg2); val funcall3(val fun, val arg1, val arg2, val arg3); +val funcall4(val fun, val arg1, val arg2, val arg3, val arg4); val reduce_left(val fun, val list, val init, val key); /* The notation curry_12_2 means take some function f(arg1, arg2) and fix a value for argument 1 to create a g(arg2). @@ -391,8 +392,10 @@ 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 curry_1234_34(val fun3, val arg1, val arg2); val chain(val first_fun, ...); val andf(val first_fun, ...); +val swap_12_21(val fun); val vector(val alloc); val vec_get_fill(val vec); val vec_set_fill(val vec, val fill); -- cgit v1.2.3