itertools2: Functions creating iterators for efficient looping