partition a list