lodash/lodash — pull request #464 by trashhalo (2014-01-29 04:39:11+00:00)
Title: use .apply for initial function call in compose then using .call

As discussed in issue #463 and http://jsperf.com/compose-each/4 (simple compose impl) a big performance win can be had by using .apply only on the first function call and using .call in the loop. This maintains the current behavior of passing all the arguments into the first function call but passing the returned values into subsequent functions.

Additionally, there isn't a reason to do any of this logic if a single function is passed in so just return that function if length === 1.