Skip to content

Instantly share code, notes, and snippets.

@chbatey
Created April 5, 2013 07:18
Show Gist options
  • Save chbatey/5317264 to your computer and use it in GitHub Desktop.
Save chbatey/5317264 to your computer and use it in GitHub Desktop.
7 languages: Scala: Day 2 E2B
import scala.io.Source._
trait CensorFromFile extends Censor {
val curses =
fromFile("day2/curses")
.getLines()
.map(_.split("="))
.map(fields => fields(0) -> fields(1)).toList
alternatives = Map(curses : _*)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment