January 2018
Beginner to intermediate
312 pages
7h 22m
English
In a programming language like F#, types play a key role, so let’s look at what a functional programmer means by type.
A type in functional programming is not the same as a class in object-oriented programming. It’s much simpler. In fact, a type is just the name given to the set of possible values that can be used as inputs or outputs of a function:

For example, we might take the set of numbers in the range -32768 to +32767 and give them the label int16. There is no special meaning or behavior to a type beyond that.
Here is an example of a function with an int16 input:
The type is what determines the function’s signature, so ...
Read now
Unlock full access