Optimize and keep arity in compose