Skip to content

Instantly share code, notes, and snippets.

@josephpconley
Created February 10, 2014 12:56
Show Gist options
  • Save josephpconley/8915428 to your computer and use it in GitHub Desktop.
Save josephpconley/8915428 to your computer and use it in GitHub Desktop.
package npr
import puzzles.WordBank
/**
* User: jconley
* Date: 1/26/14
*
* http://puzzles.blainesville.com/2014/01/npr-sunday-puzzle-jan-26-2014-remove.html
*/
object SS extends App{
val doubleS = WordBank.SCRABBLE.words.filter(word => word.matches(".*ss.*"))
val pairs = doubleS.map(word => word -> word.replace("ss", "")).seq
val validWords = pairs.filter(t => WordBank.SCRABBLE.words.contains(t._2))
validWords.foreach(println)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment