'Functional version' broke, cba to fix :)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// @ts-nocheck
|
||||
|
||||
export const pipe = (...fns) => (input) =>
|
||||
fns.reduce((acc, fn) => fn(acc), input);
|
||||
|
||||
export const redFn = (acc, x) => [...acc, x];
|
||||
|
||||
export const mapR = (fn) => (input) =>
|
||||
input.reduce((acc, x) => [...acc, fn(x)], []);
|
||||
|
||||
|
Reference in New Issue
Block a user