scala / scala-library-next

backwards-binary-compatible Scala standard library additions
Apache License 2.0
67 stars 17 forks source link

add `readWith` method to StdIn #75

Open riiswa opened 3 years ago

riiswa commented 3 years ago

Inputs are very often parsed in order to get a desired object A. I think it would be convenient to add the method StdIn.readWith[A](f: String => Boolean): A to Scala in order to make the input processing phase more natural and thus gain in fluidity (chained methods for example).