module TalkBot.Fun ( sass, hello, extend ) where

sass :: String -> String
sass s = case words s of
  []     -> hello
  w:[]   -> "Don't you \"" ++ (extend 1 w) ++ "\" me"
  a:b:[] -> a ++ " yourself!"
  ws     -> unwords $ fmap (extend 3) ws

hello :: String
hello = "hello"

extend :: Int -> String -> String
extend _ [] = []
extend n a  = a ++ (replicate n (last a))
