Threading syntax is a giant compose. OK, but that's an operator.
In the TXR internals, I have a C function called chain, which composes N functions together (left to right, not right to left like typical compose functions). It is variadic: the end of the arguments is signaled by nao: a not-an-object constant:
git grep '\<chain('
eval.c: chain(car_f, eq_to_list_f, nao),
eval.c: chain(cdr_f, consp_f, nao),
eval.c: chain(cdr_f, cdr_f, null_f, nao),
eval.c: chain(car_f, eq_to_quote_f, nao),
eval.c: chain(car_f, eq_to_list_f, nao),
eval.c: chain(cdr_f, consp_f, nao),
eval.c: chain(cdr_f, cdr_f, null_f, nao),
eval.c: chain(cdr_f, car_f, consp_f, nao),
eval.c: chain(cdr_f, car_f, car_f, eq_to_quote_f, nao),
eval.c: chain(cdr_f, car_f, cdr_f,
eval.c: return chain(juxt_fun, apf_fun, nao);
eval.c: iter_from_binding_f = chain(cdr_f, iter_begin_f, nao);
lib.c: val pred_key = chain(default_arg(key, identity_f), pred, nao);
lib.c: val pred_key = chain(default_arg(key, identity_f), pred, null_f, nao);
lib.c:val chain(val first_fun, ...)
lib.c: chain(car_f, keyfun_in, nao));
lib.h:val chain(val first_fun, ...);
match.c: chain(func_n1(cdr),
match.c: chain(func_n1(cdr),
match.c: chain(func_n1(length_list),
match.c: chain(func_n1(rest),
The _f variables are pre-computed function objects, stored in globals, to avoid consing them repeatedly. That func_n1(cdr) seen in match.c could be replaced by cdr_f , not to mention by the func_f1(rest); it conses a new function object referencing the C function
cdr each time it is called.