Simple calc in SML/NJ