fun rev1 ss = case Substring.getc ss of NONE => "" | SOME (c,ss1) => rev1 ss1 ^ str c; fun revString s = rev1(Substring.substring(s,0,size s));