You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consuming all lines from a source now requires writing a boilerplate code and it would be nice to provide an extension doing all the heavy lifting.
Open questions are:
how to consume only N strings from a source using such an interface (or consume until a condition is met)?
should Source.lines() return a collection or a sequence? If it returns a sequence, who "owns" a source after a call and who's responsible for closing it?
does such an extension make sense for any source, or it is better suited for reading files and should be defined on a filesystem?
The text was updated successfully, but these errors were encountered:
Nice extensions to have would be functions like Path.forEachLine and Path.readLines.
Consuming all lines from a source now requires writing a boilerplate code and it would be nice to provide an extension doing all the heavy lifting.
Open questions are:
Source.lines()
return a collection or a sequence? If it returns a sequence, who "owns" a source after a call and who's responsible for closing it?The text was updated successfully, but these errors were encountered: