home study engineering computer science questions and an
home / study / engineering / computer science / questions and answers / give the ml type corresponding to each of the following ... Question: Give the ML type corresponding to each of the foll... Save Give the ML type corresponding to each of the following sets: 1.{true,false} 2.{true,false} --> {true,false} 3.{(true,true),(true,false),(false,true),(false,false)}
Solution
Answer:
Here I am using pattern to match functions, as well as using pattern.
By pattern matching a function imply of type (bool * bool) -> bool applying logical implication.
A outline which matches pairs takes the form (,).
3) {(true, true), (true, false), (false, true), (false, false)} -> true
