Tuple
Tuple module: utilities for 2-tuples (pairs).
All functions operate on (a, b) pairs. Use let-destructuring to access components.
Functions
Returns the first element of a pair.
Returns the second element of a pair.
Swaps the two elements of a pair.
Applies f to the first element, returning a new pair.
Applies f to the second element, returning a new pair.
Applies f to the first element and g to the second element.
Converts a pair to a 2-element list. Both elements must be the same type.
Creates a pair from two values.
Applies a function that takes two separate args to a pair.
Returns true if both elements satisfy their respective predicates.
Zips two lists into a list of pairs. Stops at the shorter list.
Unzips a list of pairs into a pair of lists.