let exch chr =
match chr with
'a' -> 'C'
|'b' -> 'A'
|'c' -> 'D'
|'d' -> 'B';;
let rec crypt str ?(num=0) =
str.[num] <- exch (str.[num])
if num
<= String.length str
then crypt str num
+1;;
bGV0IGV4Y2ggY2hyID0KbWF0Y2ggY2hyIHdpdGgKICAgICAnYScgLT4gJ0MnCgl8J2InIC0+ICdBJwoJfCdjJyAtPiAnRCcKCXwnZCcgLT4gJ0InOzsKCmxldCByZWMgY3J5cHQgIHN0ciA/KG51bT0wKSA9CgkJc3RyLltudW1dIDwtIGV4Y2ggKHN0ci5bbnVtXSkKCQlpZiBudW0gPD0gU3RyaW5nLmxlbmd0aCBzdHIgdGhlbiBjcnlwdCBzdHIgbnVtKzE7Ow==
File "prog.ml", line 10, characters 2-4:
Syntax error: ']' expected
File "prog.ml", line 9, characters 6-7:
This '[' might be unmatched