Created
February 10, 2014 12:56
-
-
Save josephpconley/8915428 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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