Allow iterators to be passed in directly.