Sml Church numeral type inference
问题 I have this expression in SML and need to find the most general type of it. When run through the compiler I get what it shows below. How would I go about finding what the most general type would be of not only this function but other functions like church numerals function "two". val one = fn f => (fn x => f x) Why is the type of this: ('a -> 'b) -> 'a -> 'b 回答1: What you do is, you apply a process called Hindley–Milner type inference . The general principle involves three steps: First, we