compose_.compose(*functions)
Returns the composition of a list of functions, where each function consumes the return value of the function that follows. In math terms, composing the functions f(), g(), and h() produces f(g(h())).
1 2 3 4 5 | var greet = function (name){ return "hi: " + name; }; var exclaim = function (statement){ return statement.toUpperCase() + "!" ; }; var welcome = _.compose(greet, exclaim); welcome( 'moe' ); => 'hi: MOE!' |
Please login to continue.