January 2017
Intermediate to advanced
338 pages
7h 51m
English
F# has generic type as the parameterized type support, just as in C#/VB, and all have the same concept and similar semantics, although F# goes further by allowing type generalizations.
For example, in F#, to declare a type that has a generic type parameter in use:
List<'t>
If the parameter is used in code, the parameter of the generic type must be filled in, such as in this example:
List<int>
In our last example, the generic type becomes specialized as int. The List is a sample of a concrete type that has a generic type as the type parameter. This concept is also similar to the semantics in C#/VB.
Throughout this book, the types in F# that support the generic type such as F# List, Map, Set, and Array ...
Read now
Unlock full access