I use (abuse) parsers to do some string transformation e.g. normalizeWS :: Parser String
removes duplicate whitespace and normalizeCase
maps specific strings to lower case. I use parsers because the input data has some structure for example literate strings have to be left untransformed. Is there an elegant way to feed the output of one parser as input to the next and thus form a transformation pipeline? Something in the vein of normalizeWS . normalizeCase
(which of course doesnt work)?
Many thanks in advance!