Comment Comment by jrockway The type of x is Int|StringThe type of (+ 1) is Int -> IntThe type of y is IntBecause x is of type Int|String and it's passed to a function that can only operate on Int, the program fails to compile. parent jrockway 15 years ago
The type of (+ 1) is Int -> Int
The type of y is Int
Because x is of type Int|String and it's passed to a function that can only operate on Int, the program fails to compile.