diff options
author | Kaz Kyheku <kaz@kylheku.com> | 2020-03-17 22:45:05 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-17 22:45:05 -0700 |
commit | fa14bd3eccbd211c16dc7ecc06d3132f9f9539a2 (patch) | |
tree | ca9a7cba8edd6385f96b1ed6bb158912ce090b5e /match.c | |
parent | ff36d718a997d24db9ac0e49042a99d5f5fad7a2 (diff) | |
download | txr-fa14bd3eccbd211c16dc7ecc06d3132f9f9539a2.tar.gz txr-fa14bd3eccbd211c16dc7ecc06d3132f9f9539a2.tar.bz2 txr-fa14bd3eccbd211c16dc7ecc06d3132f9f9539a2.zip |
internals: rename misnamed curry_* functions.
The various curry_xx_yy functions perform partial application,
not currying. The curry prefix is being renamed to pa
(partially apply).
* lib.c (remq_lazy, remql_lazy, remqual_lazy, tree_Find):
Updated.
(do_curry_12_1, do_curry_12_1_v, do_curry_12_2,
do_curry_123_1, do_curry_123_23, do_curry_123_2,
do_curry_123_3, do_curry_1234_1, do_curry_1234_34):
Renamed to do_pa_12_1, do_pa_12_1_v, do_pa_12_2, do_pa_123_1,
do_pa_123_23, do_pa_123_2, do_pa_123_3, do_pa_1234_1,
do_pa_1234_34.
(curry_12_1, curry_12_1_v, curry_12_2, curry_123_1,
curry_123_23, curry_123_2, curry_123_3, curry_1234_1,
curry_1234_34): Renamed to pa_12_1, pa_12_1_v, pa_12_2,
pa_123_1, pa_123_23, pa_123_2, pa_123_3, pa_1234_1,
pa_1234_34.
(transposev, do_juxt): Updated.
* lib.h: Declarations renamed.
* eval.c (subst_vars, qquote_init, expand_catch, weavev):
Updated.
* filter.c (get_filter, build_filter_from_list,
filter_string_tree, filter_init): Updated.
* match.c (tx_subst_vars, do_txeval, v_freeform, v_bind,
v_throw, v_deffilter, v_assert, h_assert): Updated.
* parser.y (gather_clause): Updated.
* regex.c (regex_range_full_fun, regex_range_left_fun,
regex_range_right_fun, regex_range_search_fun): Updated.
* stream.c (open_files, open_files_star): Updated.
* txr.c (txr_main): Updated.
* unwind.c (me_defex): Updated.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -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) |