Since string constants are delimited by double quotes, we need to
escape embedded double quotes. We do this using the backslash
character. But that means we also need to escape embedded occurrences
of the backslash
fun {Escape S}
case S
of nil then nil
[] &\\|S then &\\|&\\|{Escape S}
[] &" |S then &\\|&" |{Escape S}
[] H|S then H|{Escape S}
end
end