December 2021
Beginner
840 pages
47h 29m
English
A key language concept in ML is that all functions have types.
Named functions are introduced with fun:
Here, the type of square is a function int -> int or, in other words, a function that maps an int to an int. Similarly, the type of add is a function int * int -> int or, in other words, a function that maps a tuple of type int * int to an int. Notice that the interpreter prints the domain of a function that accepts more than one parameter as a Cartesian product using the notation described in Section B.7. These functions are the ML analogs of the following Scheme ...