7
votes
1answer
592 views

How can I make this do-while loop more elegant scala

I was wondering if someone had any suggestions on how to make this code snippet more elegant. val names = Buffer[String]() var name: String = null do { val input = readLine("Name: ") if (names ...