Like range(), but for multiple sets of integers.