summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-10-25 14:28:49 -0400
committerKaz Kylheku <kaz@kylheku.com>2011-10-25 14:28:49 -0400
commit756345ddd407550ee41469667a66e7ce9d8eb49e (patch)
treefa29d7e942a344147329a78c004d1097ca9072cf /lib.h
parentbdca604f10ffdbde56c68ca30b4adbee0f10818e (diff)
downloadtxr-756345ddd407550ee41469667a66e7ce9d8eb49e.tar.gz
txr-756345ddd407550ee41469667a66e7ce9d8eb49e.tar.bz2
txr-756345ddd407550ee41469667a66e7ce9d8eb49e.zip
Shorthand for filters which map multiple texts to a common
replacement text. * filter.c (build_filter_from_list): Allow tuples to denote multiple keys mapping to the same value. * lib.c (do_curry_123_2, do_curry_123_1): New static functions. (curry_123_2, curry_123_1): New functions. * lib.h (curry_123_2, curry_123_1): New functions declared. * match.c (v_deffilter): Allow tuples of strings rather than just pairs. * txr.1: Updated.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 76ff65df..50789367 100644
--- a/lib.h
+++ b/lib.h
@@ -390,7 +390,9 @@ val reduce_left(val fun, val list, val init, val key);
Other variations follow by analogy. */
val curry_12_2(val fun2, val arg);
val curry_12_1(val fun2, val arg2);
+val curry_123_3(val fun3, val arg1, val arg2);
val curry_123_2(val fun3, val arg1, val arg3);
+val curry_123_1(val fun3, val arg2, 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, ...);