apply_transform function

Transform second argument by first.