by using an iterator, creation of many Option and Vector instances is avoided. As you said, the downside is a departure from the functional style.