I published a library which implements this idea; furry.
# | From | To | Normal | Alternative |
---|---|---|---|---|
1 | a → b → c |
a → c |
f(_, b)(a) |
f(_, b)(a) |
2 | a → b → c |
b → a → c |
nope | f(_)(b, a) |
3 | a → b → c → d |
b → d |
f(a, _, c)(b) |
f(a, _, c)(b) |
4 | a → b → c → d |
a → b → d |
f(_, _, c)(a, b) |
f(_, _, c)(a, b) |
5 | a → b → c → d |
a → c → d |
f(_, b)(a, c) |
f(_, b, _)(a, c) |