I preffer actually functional style with @tailrec. Do you see any benefits going through iterator here?