F# Resources

You are here: main » core » tuples


|

Meta

Tuples

> let tuple = 2, "foo", 3.2;;
val tuple : int * string * float

> let n, _, str = tuple;;
val str : string
val n : int

> str;;
val it : string = "foo"

> let tuple = 2, 3.2, "foo";;
val tuple : int * float * string

> let third (_,_,x) = x;;
val third : 'a * 'b * 'c -> 'c

> third tuple;;
val it : string = "foo"

See also