summaryrefslogtreecommitdiff
path: root/Coolbal/Util.hs
blob: f61761496cd3a66ca04a38518ae3c0675b0fc13a (plain)
1
2
3
4
5
6
module Coolbal.Util where


genericEscapeString :: (Char -> Bool) -> (Char -> String) -> String -> String
genericEscapeString isReserved escape =
    concatMap (\c -> if isReserved c then escape c else [c])