Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # type t = Int of int
- | String of string
- | Float of float;;
- type t = Int of int | String of string | Float of float
- # let print = function
- | Int(a) -> print_int a
- | String(a) -> print_string a
- | Float(a) -> print_float a
- | _ -> print_endline ""
- ;;
- Warning U: this match case is unused.
- val print : t -> unit = <fun>
- # let k = String("a");;
- val k : t = String "a"
- # print k;;
- a- : unit = ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement