ref: 53b4d27243b9b20a6628aa200299c3b5ac6f173a
dir: /utils.ml/
exception Syntax_error of string exception Runtime_error of string (* copied verbatim - must needs grok *) let gsub re f str = String.concat "" (List.map (function | Str.Delim x -> f x | Str.Text x -> x) (Str.full_split re str)) ;;