Changed function application to use composition and $.