Permute an iterable collection iteratively.

Signed-off-by: Ionut Radu <ihonius@gmail.com>