Answers for "composition function in type script"

0

composition function in type script

const add = (a: number) => (b: number) => a + b;
const addConstants = pipe(add(5), add(7));
addConstants(0); // 0 + 5 + 7 = 12
addConstants(100); // 100 + 5 + 7 = 112
Posted by: Guest on November-27-2021

Browse Popular Code Answers by Language