Write, in CH, Python, or Ruby, an iterator that yields
(a) all permutations of the integers $1 \ldots n$
(b) all combinations of $k$ integers from the range $1 \ldots n(0 \leq k \leq n)$.
You may represent your permutations and combinations using either a list or an array.