Sha256: 2830d9321c8ff87a01aafd304ece51cb7fa9b9f9fa79551ca3c3c84e47b3e2e6
Contents?: true
Size: 317 Bytes
Versions: 203
Compression:
Stored size: 317 Bytes
Contents
class Anagram(word: String) { def matches(anagrams: Seq[String]) = anagrams.filter(doesMatch).filterNot(isIdentical) private def doesMatch(anagram: String) = anagram.toLowerCase.sorted == word.toLowerCase.sorted private def isIdentical(anagram: String) = anagram.toLowerCase == word.toLowerCase }
Version data entries
203 entries across 203 versions & 1 rubygems