Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let foobar msg x =
- printfn msg;
- x
- let () =
- let ex1 = foobar in
- let ex2 = foobar "called" in
- let ex3 x = foobar "called" x in
- assert (ex1 "called" 1 = 1);
- assert (ex1 "called" "hi" = "hi"); (* OK *)
- assert (ex2 1 = 1);
- assert (ex2 "hi" = "hi"); (* Error! *)
- assert (ex3 1 = 1);
- assert (ex3 "hi" = "hi"); (* OK *)
Advertisement
Add Comment
Please, Sign In to add comment