summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval.c18
-rw-r--r--filter.c24
-rw-r--r--lib.c68
-rw-r--r--lib.h18
-rw-r--r--match.c26
-rw-r--r--parser.y4
-rw-r--r--regex.c14
-rw-r--r--stream.c8
-rw-r--r--txr.c2
-rw-r--r--unwind.c2
10 files changed, 92 insertions, 92 deletions
diff --git a/eval.c b/eval.c
index 61d1feb4..a5be0c79 100644
--- a/eval.c
+++ b/eval.c
@@ -2889,7 +2889,7 @@ val subst_vars(val forms, val env, val filter)
if (modifiers) {
forms = cons(format_field(str, modifiers, filter,
- curry_123_1(func_n3(eval), env, form)),
+ pa_123_1(func_n3(eval), env, form)),
rest(forms));
} else {
str = fmt_cat(str, lit(" "));
@@ -3395,14 +3395,14 @@ static val xform_listed_quote_f;
static void qquote_init(void)
{
- val eq_to_list_f = curry_12_1(eq_f, list_s);
- val eq_to_quote_f = curry_12_1(eq_f, quote_s);
+ val eq_to_list_f = pa_12_1(eq_f, list_s);
+ val eq_to_quote_f = pa_12_1(eq_f, quote_s);
val cons_f = func_n2(cons);
protect(&consp_f, &second_f, &list_form_p_f,
&quote_form_p_f, &xform_listed_quote_f, convert(val *, 0));
- eq_to_list_f = curry_12_1(eq_f, list_s);
+ eq_to_list_f = pa_12_1(eq_f, list_s);
consp_f = func_n1(consp);
second_f = func_n1(second);
list_form_p_f = andf(consp_f,
@@ -3421,8 +3421,8 @@ static void qquote_init(void)
chain(cdr_f, car_f, car_f, eq_to_quote_f, nao),
nao),
chain(cdr_f, car_f, cdr_f,
- curry_12_1(cons_f, nil),
- curry_12_2(cons_f, quote_s),
+ pa_12_1(cons_f, nil),
+ pa_12_2(cons_f, quote_s),
nao),
nil);
}
@@ -4511,8 +4511,8 @@ static val expand_catch(val form, val menv)
val catch_clauses = args;
val try_form_ex = expand(try_form, menv);
val desc_ex = expand(desc, menv);
- val catch_clauses_ex = rlcp(mapcar(curry_12_1(func_n2(expand_catch_clause),
- menv),
+ val catch_clauses_ex = rlcp(mapcar(pa_12_1(func_n2(expand_catch_clause),
+ menv),
catch_clauses),
catch_clauses);
@@ -5890,7 +5890,7 @@ static val weavev(struct args *args)
{
val lists = args_get_list(args);
val uniq = cons(nil, nil);
- val padded_lists = mapcar(curry_123_1(func_n3(pad), uniq, colon_k), lists);
+ val padded_lists = mapcar(pa_123_1(func_n3(pad), uniq, colon_k), lists);
val tuples = lazy_mapcarl(list_f, padded_lists);
val env = cons(uniq, tuples);
val whil = func_f0(env, weave_while);
diff --git a/filter.c b/filter.c
index 0493d566..37e7bb8b 100644
--- a/filter.c
+++ b/filter.c
@@ -210,14 +210,14 @@ val get_filter(val spec)
{
if (consp(spec)) {
if (car(spec) == fun_k) {
- return curry_123_2(func_n3(match_filter), second(spec), rest(rest(spec)));
+ return pa_123_2(func_n3(match_filter), second(spec), rest(rest(spec)));
} else {
val filter_list = mapcar(func_n1(get_filter), spec);
if (memqual(nil, filter_list))
return nil;
- return curry_12_2(func_n2(compound_filter), filter_list);
+ return pa_12_2(func_n2(compound_filter), filter_list);
}
}
@@ -248,7 +248,7 @@ static val build_filter_from_list(val list)
for (iter = list; iter; iter = cdr(iter)) {
val tuple = reverse(car(iter));
- mapcar(curry_123_2(func_n3(trie_add), trie, first(tuple)), rest(tuple));
+ mapcar(pa_123_2(func_n3(trie_add), trie, first(tuple)), rest(tuple));
}
trie_compress(mkcloc(trie));
@@ -303,7 +303,7 @@ val filter_string_tree(val filter, val obj)
case NIL:
return nil;
case CONS:
- return mapcar(curry_12_2(func_n2(filter_string_tree), filter), obj);
+ return mapcar(pa_12_2(func_n2(filter_string_tree), filter), obj);
default:
{
val type = typeof(filter);
@@ -1064,18 +1064,18 @@ void filter_init(void)
get_filter(fromhtml_k));
sethash(fh, upcase_k, func_n1(upcase_str));
sethash(fh, downcase_k, func_n1(downcase_str));
- sethash(fh, topercent_k, curry_12_1(func_n2(url_encode), nil));
- sethash(fh, frompercent_k, curry_12_1(func_n2(url_decode), nil));
- sethash(fh, tourl_k, curry_12_1(func_n2(url_encode), t));
- sethash(fh, fromurl_k, curry_12_1(func_n2(url_decode), t));
- sethash(fh, tobase64_k, curry_12_1(func_n2(base64_encode), 0));
+ sethash(fh, topercent_k, pa_12_1(func_n2(url_encode), nil));
+ sethash(fh, frompercent_k, pa_12_1(func_n2(url_decode), nil));
+ sethash(fh, tourl_k, pa_12_1(func_n2(url_encode), t));
+ sethash(fh, fromurl_k, pa_12_1(func_n2(url_decode), t));
+ sethash(fh, tobase64_k, pa_12_1(func_n2(base64_encode), 0));
sethash(fh, frombase64_k, func_n1(base64_decode));
- sethash(fh, tobase64url_k, curry_12_1(func_n2(base64url_encode), 0));
+ sethash(fh, tobase64url_k, pa_12_1(func_n2(base64url_encode), 0));
sethash(fh, frombase64url_k, func_n1(base64url_decode));
sethash(fh, tonumber_k, func_n1(num_str));
- sethash(fh, toint_k, curry_12_1(func_n2(int_str), nil));
+ sethash(fh, toint_k, pa_12_1(func_n2(int_str), nil));
sethash(fh, tofloat_k, func_n1(flo_str));
- sethash(fh, hextoint_k, curry_12_1(func_n2(int_str), num_fast(16)));
+ sethash(fh, hextoint_k, pa_12_1(func_n2(int_str), num_fast(16)));
reg_fun(intern(lit("make-trie"), user_package), func_n0(make_trie));
reg_fun(intern(lit("trie-add"), user_package), func_n3(trie_add));
diff --git a/lib.c b/lib.c
index add50d30..8d0fc67c 100644
--- a/lib.c
+++ b/lib.c
@@ -2084,17 +2084,17 @@ static val rem_lazy_rec(val pred, val list, val env, val func)
val remq_lazy(val obj, val list)
{
- return rem_lazy_rec(curry_12_1(eq_f, obj), nullify(list), nil, nil);
+ return rem_lazy_rec(pa_12_1(eq_f, obj), nullify(list), nil, nil);
}
val remql_lazy(val obj, val list)
{
- return rem_lazy_rec(curry_12_1(eql_f, obj), nullify(list), nil, nil);
+ return rem_lazy_rec(pa_12_1(eql_f, obj), nullify(list), nil, nil);
}
val remqual_lazy(val obj, val list)
{
- return rem_lazy_rec(curry_12_1(equal_f, obj), nullify(list), nil, nil);
+ return rem_lazy_rec(pa_12_1(equal_f, obj), nullify(list), nil, nil);
}
val remove_if_lazy(val pred, val list, val key)
@@ -2114,8 +2114,8 @@ val tree_find(val obj, val tree, val testfun)
if (funcall2(default_arg(testfun, equal_f), obj, tree))
return t;
else if (consp(tree))
- return some_satisfy(tree, curry_123_2(func_n3(tree_find),
- obj, testfun), nil);
+ return some_satisfy(tree, pa_123_2(func_n3(tree_find),
+ obj, testfun), nil);
return nil;
}
@@ -6962,77 +6962,77 @@ val reduce_right(val fun, val list, val init, val key)
init));
}
-static val do_curry_12_2(val fcons, val arg2)
+static val do_pa_12_2(val fcons, val arg2)
{
return funcall2(car(fcons), cdr(fcons), arg2);
}
-val curry_12_2(val fun2, val arg)
+val pa_12_2(val fun2, val arg)
{
- return func_f1(cons(fun2, arg), do_curry_12_2);
+ return func_f1(cons(fun2, arg), do_pa_12_2);
}
-static val do_curry_12_1(val fcons, val arg1)
+static val do_pa_12_1(val fcons, val arg1)
{
return funcall2(car(fcons), arg1, cdr(fcons));
}
-val curry_12_1(val fun2, val arg2)
+val pa_12_1(val fun2, val arg2)
{
- return func_f1(cons(fun2, arg2), do_curry_12_1);
+ return func_f1(cons(fun2, arg2), do_pa_12_1);
}
-static val do_curry_12_1_v(val fcons, struct args *args)
+static val do_pa_12_1_v(val fcons, struct args *args)
{
return funcall2(car(fcons), args_get_list(args), cdr(fcons));
}
-static val curry_12_1_v(val fun2, val arg2)
+static val pa_12_1_v(val fun2, val arg2)
{
- return func_f0v(cons(fun2, arg2), do_curry_12_1_v);
+ return func_f0v(cons(fun2, arg2), do_pa_12_1_v);
}
-static val do_curry_123_3(val fcons, val arg3)
+static val do_pa_123_3(val fcons, val arg3)
{
return funcall3(car(fcons), car(cdr(fcons)), cdr(cdr(fcons)), arg3);
}
-val curry_123_3(val fun3, val arg1, val arg2)
+val pa_123_3(val fun3, val arg1, val arg2)
{
- return func_f1(cons(fun3, cons(arg1, arg2)), do_curry_123_3);
+ return func_f1(cons(fun3, cons(arg1, arg2)), do_pa_123_3);
}
-static val do_curry_123_2(val fcons, val arg2)
+static val do_pa_123_2(val fcons, val arg2)
{
return funcall3(car(fcons), car(cdr(fcons)), arg2, cdr(cdr(fcons)));
}
-val curry_123_2(val fun3, val arg1, val arg3)
+val pa_123_2(val fun3, val arg1, val arg3)
{
- return func_f1(cons(fun3, cons(arg1, arg3)), do_curry_123_2);
+ return func_f1(cons(fun3, cons(arg1, arg3)), do_pa_123_2);
}
-static val do_curry_123_1(val fcons, val arg1)
+static val do_pa_123_1(val fcons, val arg1)
{
return funcall3(car(fcons), arg1, car(cdr(fcons)), cdr(cdr(fcons)));
}
-val curry_123_1(val fun3, val arg2, val arg3)
+val pa_123_1(val fun3, val arg2, val arg3)
{
- return func_f1(cons(fun3, cons(arg2, arg3)), do_curry_123_1);
+ return func_f1(cons(fun3, cons(arg2, arg3)), do_pa_123_1);
}
-static val do_curry_123_23(val fcons, val arg2, val arg3)
+static val do_pa_123_23(val fcons, val arg2, val arg3)
{
return funcall3(car(fcons), cdr(fcons), arg2, arg3);
}
-val curry_123_23(val fun3, val arg1)
+val pa_123_23(val fun3, val arg1)
{
- return func_f2(cons(fun3, arg1), do_curry_123_23);
+ return func_f2(cons(fun3, arg1), do_pa_123_23);
}
-static val do_curry_1234_1(val fcons, val arg1)
+static val do_pa_1234_1(val fcons, val arg1)
{
cons_bind (fun, dr, fcons);
cons_bind (arg2, ddr, dr);
@@ -7042,19 +7042,19 @@ static val do_curry_1234_1(val fcons, val arg1)
return funcall4(fun, arg1, arg2, arg3, arg4);
}
-val curry_1234_1(val fun4, val arg2, val arg3, val arg4)
+val pa_1234_1(val fun4, val arg2, val arg3, val arg4)
{
- return func_f1(list(fun4, arg2, arg3, arg4, nao), do_curry_1234_1);
+ return func_f1(list(fun4, arg2, arg3, arg4, nao), do_pa_1234_1);
}
-static val do_curry_1234_34(val fcons, val arg3, val arg4)
+static val do_pa_1234_34(val fcons, val arg3, val arg4)
{
return funcall4(car(fcons), car(cdr(fcons)), cdr(cdr(fcons)), arg3, arg4);
}
-val curry_1234_34(val fun4, val arg1, val arg2)
+val pa_1234_34(val fun4, val arg1, val arg2)
{
- return func_f2(cons(fun4, cons(arg1, arg2)), do_curry_1234_34);
+ return func_f2(cons(fun4, cons(arg1, arg2)), do_pa_1234_34);
}
val transposev(struct args *list)
@@ -7068,7 +7068,7 @@ val transposev(struct args *list)
case STR:
case LSTR:
case LIT:
- func = curry_12_1_v(func_n2(cat_str), nil);
+ func = pa_12_1_v(func_n2(cat_str), nil);
break;
case VEC:
func = func_n0v(vectorv);
@@ -7152,7 +7152,7 @@ val chandv(struct args *funlist)
static val do_juxt(val funcs, struct args *args)
{
- return mapcar(curry_12_1(func_n2(apply), args_get_list(args)), funcs);
+ return mapcar(pa_12_1(func_n2(apply), args_get_list(args)), funcs);
}
val juxtv(struct args *funlist)
diff --git a/lib.h b/lib.h
index 1de96492..dfc73e98 100644
--- a/lib.h
+++ b/lib.h
@@ -992,17 +992,17 @@ val reduce_left(val fun, val list, val init, val key);
val reduce_right(val fun, val list, val init, val key);
val transposev(struct args *lists);
val transpose(val lists);
-/* The notation curry_12_2 means take some function f(arg1, arg2) and
+/* The notation pa_12_2 means take some function f(arg1, arg2) and
fix a value for argument 1 to create a g(arg2).
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_1(val fun4, val arg2, val arg3, val arg4);
-val curry_1234_34(val fun3, val arg1, val arg2);
+val pa_12_2(val fun2, val arg);
+val pa_12_1(val fun2, val arg2);
+val pa_123_3(val fun3, val arg1, val arg2);
+val pa_123_2(val fun3, val arg1, val arg3);
+val pa_123_1(val fun3, val arg2, val arg3);
+val pa_123_23(val fun3, val arg1);
+val pa_1234_1(val fun4, val arg2, val arg3, val arg4);
+val pa_1234_34(val fun3, val arg1, val arg2);
val chain(val first_fun, ...);
val chainv(struct args *funlist);
val chandv(struct args *funlist);
diff --git a/match.c b/match.c
index c08464a4..c3e71388 100644
--- a/match.c
+++ b/match.c
@@ -1700,7 +1700,7 @@ static val tx_subst_vars(val spec, val bindings, val filter)
if (modifiers) {
spec = cons(format_field(str, modifiers, filter,
- curry_123_2(func_n3(txeval), spec, bindings)),
+ pa_123_2(func_n3(txeval), spec, bindings)),
rest(spec));
} else {
if (!stringp(str))
@@ -1789,7 +1789,7 @@ static val do_txeval(val spec, val form, val bindings, val allow_unbound)
} else if (sym == var_s || sym == expr_s) {
ret = tleval(spec, second(form), bindings);
} else {
- ret = mapcar(curry_123_2(func_n3(txeval), spec, bindings), form);
+ ret = mapcar(pa_123_2(func_n3(txeval), spec, bindings), form);
}
} else if (stringp(form)) {
ret = form;
@@ -2521,7 +2521,7 @@ static val v_freeform(match_files_ctx *c)
spec_bind (specline, first_spec, c->spec);
val args = rest(first_spec);
- val vals = mapcar(curry_123_2(func_n3(tleval_144), first_spec, c->bindings),
+ val vals = mapcar(pa_123_2(func_n3(tleval_144), first_spec, c->bindings),
args);
if ((c->spec = rest(c->spec)) == nil) {
@@ -3649,7 +3649,7 @@ static val v_bind(match_files_ctx *c)
filter_spec, nao);
}
- testfun = curry_1234_34(func_n4(filter_equal), filter, filter);
+ testfun = pa_1234_34(func_n4(filter_equal), filter, filter);
} else if (rfilt_spec || lfilt_spec) {
val rfilt = if3(rfilt_spec, get_filter(rfilt_spec), identity_f);
val lfilt = if3(lfilt_spec, get_filter(lfilt_spec), identity_f);
@@ -3664,7 +3664,7 @@ static val v_bind(match_files_ctx *c)
lfilt_spec, nao);
}
- testfun = curry_1234_34(func_n4(filter_equal), lfilt, rfilt);
+ testfun = pa_1234_34(func_n4(filter_equal), lfilt, rfilt);
}
uw_match_env_begin;
@@ -4090,7 +4090,7 @@ static val v_throw(match_files_ctx *c)
sem_error(specline, lit("throw: ~a is not a type symbol"),
type, nao);
{
- val values = mapcar(curry_123_2(func_n3(txeval_allow_ub),
+ val values = mapcar(pa_123_2(func_n3(txeval_allow_ub),
specline, c->bindings), args);
uw_throw(type, values);
}
@@ -4111,11 +4111,11 @@ static val v_deffilter(match_files_ctx *c)
if (!all_satisfy(table_evaled, andf(func_n1(listp),
chain(func_n1(length_list),
- curry_12_1(func_n2(ge), two), nao),
+ pa_12_1(func_n2(ge), two), nao),
chain(func_n1(rest),
- curry_123_1(func_n3(all_satisfy),
- func_n1(stringp),
- nil),
+ pa_123_1(func_n3(all_satisfy),
+ func_n1(stringp),
+ nil),
nao),
nao),
nil))
@@ -4309,7 +4309,7 @@ static val v_assert(match_files_ctx *c)
if (result) {
return result;
} else if (type) {
- val values = mapcar(curry_123_2(func_n3(txeval_allow_ub),
+ val values = mapcar(pa_123_2(func_n3(txeval_allow_ub),
specline, c->bindings), args);
uw_throw(type, values);
} else {
@@ -4546,8 +4546,8 @@ static val h_assert(match_line_ctx *c)
if (result) {
return result;
} else if (type) {
- val values = mapcar(curry_123_2(func_n3(txeval_allow_ub),
- c->specline, c->bindings), elem);
+ val values = mapcar(pa_123_2(func_n3(txeval_allow_ub),
+ c->specline, c->bindings), elem);
uw_throw(type, values);
} else {
if (c->file)
diff --git a/parser.y b/parser.y
index 6588b50e..81e7dd0a 100644
--- a/parser.y
+++ b/parser.y
@@ -327,7 +327,7 @@ gather_clause : GATHER exprs_opt ')'
newl gather_parts
END newl { val args = match_expand_keyword_args($2);
$$ = list(gather_s,
- append2(mapcar(curry_12_1(func_n2(cons), nil),
+ append2(mapcar(pa_12_1(func_n2(cons), nil),
first($5)), rest($5)),
args, nao);
rl($$, num($1)); }
@@ -338,7 +338,7 @@ gather_clause : GATHER exprs_opt ')'
clauses_opt
END newl { val args = match_expand_keyword_args($2);
$$ = list(gather_s,
- append2(mapcar(curry_12_1(func_n2(cons), nil),
+ append2(mapcar(pa_12_1(func_n2(cons), nil),
first($5)), rest($5)),
args, cons(cdr($6),
cons($7, $10)), nao);
diff --git a/regex.c b/regex.c
index beb61387..a4dc69eb 100644
--- a/regex.c
+++ b/regex.c
@@ -3092,26 +3092,26 @@ val regex_range_all(val regex, val arg1, val arg2, val arg3)
val regex_range_full_fun(val regex, val pos)
{
- return curry_123_3(func_n3(regex_range_full),
- regex, default_arg(pos, zero));
+ return pa_123_3(func_n3(regex_range_full),
+ regex, default_arg(pos, zero));
}
val regex_range_left_fun(val regex, val pos)
{
- return curry_123_3(func_n3(regex_range_left),
- regex, default_arg(pos, zero));
+ return pa_123_3(func_n3(regex_range_left),
+ regex, default_arg(pos, zero));
}
val regex_range_right_fun(val regex, val end)
{
if (null_or_missing_p(end))
- return curry_123_2(func_n3(regex_range_right), regex, end);
- return curry_123_3(func_n3(regex_range_left), regex, end);
+ return pa_123_2(func_n3(regex_range_right), regex, end);
+ return pa_123_3(func_n3(regex_range_left), regex, end);
}
val regex_range_search_fun(val regex, val start, val from_end)
{
- return curry_1234_1(func_n4(range_regex), regex, start, from_end);
+ return pa_1234_1(func_n4(range_regex), regex, start, from_end);
}
static val scan_until_common(val self, val regex, val stream_in,
diff --git a/stream.c b/stream.c
index 7acabe82..0e19ab73 100644
--- a/stream.c
+++ b/stream.c
@@ -4575,8 +4575,8 @@ static val open_files(val file_list, val substitute_stream, val mode)
if (nilp(file_list) && substitute_stream) {
return substitute_stream;
} else if (mode) {
- return make_catenated_stream(mapcar(curry_12_1(func_n2o(open_file, 1),
- mode), file_list));
+ return make_catenated_stream(mapcar(pa_12_1(func_n2o(open_file, 1),
+ mode), file_list));
} else {
return make_catenated_stream(mapcar(func_n2o(open_file, 1), file_list));
}
@@ -4590,8 +4590,8 @@ static val open_files_star(val file_list, val substitute_stream, val mode)
if (nilp(file_list) && substitute_stream) {
return substitute_stream;
} else if (mode) {
- return make_catenated_stream(lazy_mapcar(curry_12_1(func_n2o(open_file, 1),
- mode), file_list));
+ return make_catenated_stream(lazy_mapcar(pa_12_1(func_n2o(open_file, 1),
+ mode), file_list));
} else {
return make_catenated_stream(lazy_mapcar(func_n2o(open_file, 1), file_list));
}
diff --git a/txr.c b/txr.c
index ef9afd9a..ae639782 100644
--- a/txr.c
+++ b/txr.c
@@ -623,7 +623,7 @@ int txr_main(int argc, char **argv)
}
arg = sub_str(arg, num(8), nil);
arg2 = upop(&arg_list, &arg_undo);
- arg_list = append2(mapcar(iffi(curry_12_2(equal_f, lit("{}")),
+ arg_list = append2(mapcar(iffi(pa_12_2(equal_f, lit("{}")),
retf(arg2), nil),
split_str(arg, sep)),
arg_list);
diff --git a/unwind.c b/unwind.c
index 478ac5a4..0f9ffe63 100644
--- a/unwind.c
+++ b/unwind.c
@@ -955,7 +955,7 @@ static val me_defex(val form, val menv)
eval_error(form, lit("defex: arguments must all be symbols"), nao);
return cons(intern(lit("register-exception-subtypes"), user_package),
- mapcar(curry_12_2(list_f, quote_s), types));
+ mapcar(pa_12_2(list_f, quote_s), types));
}
static val exception_subtype_map(void)