Implementation of _.compose with reverse and reduce