Tuples

let pair = (1, "one")                 // int * string
let triple = 1, 2.0, "three"          // parentheses optional
let first = fst pair                  // 1 (fst/snd for pairs only)
let second = snd pair                 // "one"
let (a, b, c) = triple                // deconstruction
let a2, _, _ = triple                 // ignore parts with _

let divRem x y = (x / y, x % y)       // return multiple values
let q, r = divRem 17 5                // 3, 2

let swap (x, y) = (y, x)
let structTuple = struct (1, 2)       // value-type tuple (no allocation)
let point = {| X = 1; Y = 2 |}        // anonymous record (Module 9)