January 2023
Intermediate to advanced
648 pages
17h 32m
English

We have seen functions that have a concrete type, such as not, which takes a Bool as input and returns a Bool as output. We have also seen functions with types that use a type variable to express that they work with all types, such as head, which takes a list of any type and returns the first element. Use of a type variable expresses commonality over all types.
Between the extremes of functions that work with a single type and functions that work with all types is a need to express a more limited commonality among types that does not extend to all types. For example, we would like addition to be available for numeric types like ...
Read now
Unlock full access