Apply one replacement to each original character and concatenate the results:The concatMap operation combines a map function and list concatenation. Replacements occur in original-character order, so a character produced by a replacement is not processed again during the same step. This is parallel string rewriting. In particular
step :: [Rule] -> State -> State
step rules = concatMap (applyRule rules)step rules "" = "", with no rule lookup required for the empty state. Articles by others on the same topic
There are currently no matching articles.