module TFwH.Chap01.ExF where
import Prelude hiding (Word)
import Data.Char (toLower)
import Data.List (sortBy)
import Data.Ord (comparing)
type Word = String
type Label = String
type Labeled = (,) Label
type Anagram = (Label, [Word])
anagrams :: Int -> [Word] -> String
anagrams n = unlines
. map showAnagram
. groupByLabel
. sortByLabel
. map addLabel
. selectByLength n
selectByLength :: Int -> [Word] -> [Word]
selectByLength n = undefined
addLabel :: Word -> Labeled Word
addLabel w = undefined
sortByLabel :: [Labeled Word] -> [Labeled Word]
sortByLabel = undefined
groupByLabel :: [Labeled Word] -> [Anagram]
groupByLabel = undefined
showAnagram :: Anagram -> String
showAnagram = undefined