concept power in category functional programming

appears as: power, powers
Grokking Functional Programming

This is an excerpt from Manning's book Grokking Functional Programming.

def rankedWords(wordScore: String => Int,
                words: List[String]): List[String] = {
  words.sortBy(wordScore).reverse
}
def score(word: String): Int = word.replaceAll("a", "").length
def bonus(word: String): Int = if (word.contains("c")) 5 else 0

This is not a functional way! Pure functions always indicate all of the possible return values. The signature of parseShow needs to indicate that for some Strings, there is no correct TvShow.