tagLastWords :: [Word a b] -> [(Word a b, LastWord)]
tagLastWords = reverse . go . reverse
  where
    go [] = []
    go (x : xs) = (x, IsLastWord) : finish xs
    finish = fmap (\x -> (x, NotLastWord))
tagLastWords :: [Word a b] -> [(Word a b, LastWord)]
tagLastWords = reverse . go . reverse
  where
    go [] = []
    go (x : xs) = (x, IsLastWord) : finish xs
    finish = fmap (\x -> (x, NotLastWord))
tagLastWords = reverse . go . reverse
  where
    go [] = []
    go (x : xs) = (x, IsLastWord) : finish xs
    finish = fmap (\x -> (x, NotLastWord))