fun f((a,b),(c,d)) = if ac then GREATER (* here a=c *) else if bd then GREATER else EQUAL; f((1,2),(3,4)); f((1,3),(1,2)); f((4,5),(4,5));