Question: 2 (Hindley Milner Type checking) For this problem, you should give the answers and you do not need to show your work if there is

2 (Hindley Milner Type checking) For this problem, you should give the answers and you do not need to show your work if there is no type checking error. The OCaml language is based on Hindley-Milner type checking. You can experiment and use this OCaml editor: https://try.ocamlpro.com For each question, just give the type of x or explain why there is a type mismatch. 1. What is the type of x in the following? let f3 x y f = f 1 + x f ;; Answer Tx = 2. What is the type of x in the following? let f6 x y = y x + x (y x) ;; Answer Tx = 3. What is the type of x in the following? let f7 x y z = if y z then x z else y z ;; Answer Tx =

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