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