F# supports many data types, for example:
- Primitive types: bool, int, float, string values.
- Aggregate type: class, struct, union, record, and enum
- Array: int[], int[ , ], and float[ , , ]
- Tuple: type1 * type2 * like (a,1,2,true) type is—char * int * int * bool
- Generic: list<’x>, dictionary < ’key, ’value>
In an F# function, we can pass one tuple instead of multiple parameters of different types. Declaration of a tuple is very simple and we can assign values of a tuple to different variables, for example:
let tuple1 = 1,2,3// assigning values to variables , v1=1, v2= 2, v3=3let v1,v2,v3 = tuple1// if we want to assign only two values out of three, use “_” to skip the value. ...