📜  什么是函数式编程 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:57.040000             🧑  作者: Mango

代码示例3
const myResult = f1(  f2(data)  );                      // composition: pass the output DATA of one function to the input of another ... like pipes.
function add(a){return  function(b){return a + b}  }     // functional composition
add(2)(3) //-> 5