SML: solution to first few problems in assgn1 and test