Document currying and composition