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
- Why I Love F#: Tuples (Dustin Campbell)
- Why I Love F#: Breaking Up Tuples (Dustin Campbell)
- Why I Love F#: Result Tuples (Dustin Campbell)