(* Example of code that does not typecheck in Standard ML, due to that language's half-baked operator overloading *) ; (*[ val add3 : (-all a, b, c : int- int(a) * int(b) * int(c) -> int(a + b + c)) & (-all d : dim- real(d) * real(d) * real(d) -> real(d)) ]*) fun add3 (x, y, z) = x + y + z (* SML arbitrarily prefers the integer variant of +, inferring val add3 : int * int * int -> int *) val x = add3 (10, 100, 1000) val y = add3 (12.3, 100.0, 3.1267) (* rejected by SML *)