tuples
A tiny tuple-like implementation in JavaScript.
Installation
npm install tuples
Usage
const tuple fst snd swap =const t = // => [1, 2]// => 1// => 2// => [2, 1]
API
t = tuple(...any)
Construct a new tuple.
fst(t)
Extract the first component of a pair.
snd(t)
Extract the second component of a pair.
swap(t)
Swap the components of a pair.