What does the lodash flow function do?
问题 I am reading some code that uses _.flow() from lodash and the explanation in the docs just isn't making sense to me. The doc says Creates a function that returns the result of invoking the given functions with the this binding of the created function, where each successive invocation is supplied the return value of the previous. With the example: function square(n) { return n * n; } var addSquare = _.flow([_.add, square]); addSquare(1, 2); // => 9 I have read this a few times and I can not