Functional programming combinator

https://segmentfault.com/a/1190000016803036#articleHeader11

 

What is a combination of sub

Combinator there, but we are not talking about mathematics is defined in mathematics, but in the JavaScript field sub-portfolio concept. According to my understanding of JavaScript programming function , I will combination of sub- divided into secondary sub-combinations and function composition sub . We will follow these two combined sub distinction.

Combinator (full name: composition Functions ) also known decorator function , or a function to convert data, data enhancement functions or behavior of higher-order functions . Here we mention the higher-order functions is no stranger to the so-called higher-order functions , is to function as a parameter or return value of the function. Auxiliary combinator is the most simple combination promoter, which is a data flow control abstraction function . The function combinator very special, and it must function (referred to as the original function , or DMC function ) as a parameter, which substantially has the following characteristics:

  1. Sub-function combination itself is higher-order functions ;
  2. It does not change the original function ( wedge function ) of the ultimate intentions;
  3. You can enhance the original function (DMC function) behavior;

Guess you like

Origin www.cnblogs.com/feng9exe/p/11365990.html