Skip to content

Instantly share code, notes, and snippets.

@mistahenry
Created April 19, 2014 21:56
Show Gist options
  • Save mistahenry/11098747 to your computer and use it in GitHub Desktop.
Save mistahenry/11098747 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
@ruoguluo
Copy link

ruoguluo commented Oct 7, 2017

Nice!

@Firassaad
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment