More lib files, more functional
Still missing that 'attack' fn, though :(
This commit is contained in:
7
lib/combinators.ts
Normal file
7
lib/combinators.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const tap = (fn) => (input) => {
|
||||
fn(input);
|
||||
return input;
|
||||
};
|
||||
|
||||
export const doIf = (fn, pred) => (input) =>
|
||||
pred ? fn(input) : input;
|
Reference in New Issue
Block a user