getall function

Get all permutations/combinations for a iterator