test.sml - implement the mechanism to go through pattern datatype