上QQ阅读APP看书,第一时间看更新
Currying functions
Currying is a process of evaluating function arguments one by one, at the end of each evaluation producing a new function with one argument less. Currying is useful when arguments of a function need to be evaluated at different places. Using the currying process, one argument may be evaluated at some component, then it can be passed to any other place, and then the result can be passed to another component until all the arguments are evaluated. This seems very similar to our microservices analogy. We will use currying later on when we have service dependencies.