-- | trims a string only on the right side
trimRight :: String -> String
trimRight = foldr (\ c cs -> if isSpace c && null cs then [] else c : cs) ""
trimRight :: String -> String
trimRight = foldr (\ c cs -> if isSpace c && null cs then [] else c : cs) ""
trimRight = foldr (\ c cs -> if isSpace c && null cs then [] else c : cs) ""