Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* version qui met une erreur *)
- let apply f x = f x;;
- let identity = apply (fun t -> t);;
- identity 1;;
- identity true;;(* Error: This expression has type bool but an expression was expected of type int *)
- (* version qui marche *)
- let apply f x = f x;;
- let identity x = apply (fun t -> t) x;;
- identity 1;;
- identity true;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement