prettyfied the implementation of task 4 in the compiler.sml