diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-25 14:28:49 -0400 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-25 14:28:49 -0400 |
commit | 756345ddd407550ee41469667a66e7ce9d8eb49e (patch) | |
tree | fa29d7e942a344147329a78c004d1097ca9072cf /lib.h | |
parent | bdca604f10ffdbde56c68ca30b4adbee0f10818e (diff) | |
download | txr-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, ...); |