error when iterator#len() is evaluated on infinite iterators