4 ms·
[ fn1, fn2, fn3, fn4 ].reduce((s, i) => i(s), starting_value); Same thing. Less code, standard functions.
by kemiller2002 3y ago
[
fn1,
fn2,
fn3,
fn4
].reduce((s, i) => i(s), starting_value);
Same thing. Less code, standard functions.