use Iterator.single(elem) instead of Iterator(elem) for improved performance based on scaladocs