# match 3 with | 0 -> "z" | 1 -> "o" | 6 -> "t" | _ -> "m";;
- : string = "m"
# match 3 with | 0 -> "z" | 1 -> "o" | 2 -> "t" | _ -> "m";;
Exception: Invalid_argument "index out of bounds".
# let thing = function | 0 -> "z" | 2 -> "t" | 4 -> "f" | _ -> "meh";;
val thing : int -> string = <fun>
# thing -1;;
File "", line 1, characters 0-4:
Error: This expression has type int -> string
but an expression was expected of type int