Skip to content

Instantly share code, notes, and snippets.

@terry-heinel
Forked from mistahenry/file_io.scala
Created February 15, 2017 17:17
Show Gist options
  • Save terry-heinel/1de80840a02958983f84b3194a2e0d84 to your computer and use it in GitHub Desktop.
Save terry-heinel/1de80840a02958983f84b3194a2e0d84 to your computer and use it in GitHub Desktop.
Read file into List of lines in Scala
import scala.io.Source
val listOfLines = Source.fromFile("filename.txt").getLines.toList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment