Created
April 5, 2013 07:18
-
-
Save chbatey/5317264 to your computer and use it in GitHub Desktop.
7 languages: Scala: Day 2 E2B
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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