Lecture 4, CSE341, Spring 2004 summary * "One of" types vs. "Each of" types * what operations each should have * synergy from combining the ideas * brief comparison with OO classes (will come back to this) * some jargon for this (sum types, product types, constructors, ...) * Record types in ML * just another "Each of" type * User-defined types in ML * datatype and case * type synonyms * lack of need for built-in tuples and lists * More on pattern-matching * the "built-in" way for testing "One of" variants * elegant and preferable style * check for impossible cases * check for inexhaustive matches