Question: please simply answer these questions in ocaml language, not C,java! just briefly answer these in ocaml I have no idea what do u need more

please simply answer these questions in ocaml language, not C,java! please simply answer these questions in ocaml language, not C,java! just briefly
just briefly answer these in ocaml
I have no idea what do u need more

*Type Inference 2. Consider a function with polymorphic type f : ' -> 'a -> 2.1. What is the type of fo ? Int I 2.2. What is the type of fun x -> (f f) x ? Briefly explain your reasoning. 3. Consider a function with polymorphic type f : (a + b) -> ('b -> 'a) -> 'a 3.1. What is the type of f (0, true) ? 3.2. What is the type of fun x y -> f (x, y) ? Does it have the same type as f ? Briefly explain your reasoning. 4. Consider a function with polymorphic type g: ('a -> 'b -> b) -> ' -> 'a. 4.1. What is the type of g (+)? int- 4.2. What is the type of fun x -> (g g) * ? Briefly explain your reasoning. *Type Inference 2. Consider a function with polymorphic type f : ' -> 'a -> 2.1. What is the type of fo ? Int I 2.2. What is the type of fun x -> (f f) x ? Briefly explain your reasoning. 3. Consider a function with polymorphic type f : (a + b) -> ('b -> 'a) -> 'a 3.1. What is the type of f (0, true) ? 3.2. What is the type of fun x y -> f (x, y) ? Does it have the same type as f ? Briefly explain your reasoning. 4. Consider a function with polymorphic type g: ('a -> 'b -> b) -> ' -> 'a. 4.1. What is the type of g (+)? int- 4.2. What is the type of fun x -> (g g) * ? Briefly explain your reasoning

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!