myWords :: String -> [String]
myWords = reverse . foldl' step [""]
  where
    step (w:ws) c  | not (isSpace c) = (w++[c]):ws
    step l@(w:_) _ | null w          = l
    step ws _                        = "":ws
myWords :: String -> [String]
myWords = reverse . foldl' step [""]
  where
    step (w:ws) c  | not (isSpace c) = (w++[c]):ws
    step l@(w:_) _ | null w          = l
    step ws _                        = "":ws
myWords = reverse . foldl' step [""]
  where
    step (w:ws) c  | not (isSpace c) = (w++[c]):ws
    step l@(w:_) _ | null w          = l
    step ws _                        = "":ws