added requirement that f is a unary function in xCompose