generate the combinations of k distinct objects chosen from the n elements of a lsit