ML Programming Ex 3 finished