Functional Programming & Proofs


Exercices

  1. Propose a program to encrypt/decrypt a text

Nb. You can use the functions from the String module, and char:int->char function or its inverse int:char:->int

let crypt (key:int) (txt:string):string = // ???

Variations: key="secret", rot13, ...

answer

  1. Try to run and test the code given in the previous answer.