Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # let is_string (_:string) = ();;
- val is_string : string -> unit = <fun>
- # is_string 3;;
- Error: This expression has type int but an expression was expected of type
- string
- # is_string "3";;
- - : unit = ()
- # module MyUsers = Map.Make(String);;
- ...
- # MyUsers.max_binding;;
- - : 'a MyUsers.t -> MyUsers.key * 'a = <fun>
- # let map = MyUsers.add "toto" 42 MyUsers.empty;;
- val map : int MyUsers.t = <abstr>
- # let (k, v) = MyUsers.max_binding map;;
- val k : MyUsers.key = "toto"
- val v : int = 42
- # is_string k;;
- - : unit = ()
Advertisement
Add Comment
Please, Sign In to add comment