Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
private def exercise5() {
val list =
Source.fromFile("SonnetI.txt")
.getLines()
.flatMap(line => line.split(WORD_REGEXP))
.toSeq
.distinct
list.foreach(println)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment