Skip to main content
Version: Next

pair

curry: <a, b, c>(f: (pair: [a, b]) => c, x: a, y: b) => c

The call curry(f,x,y) has the same value as f(x,y).

uncurry: <a, b, c>(f: (_: a) => (_: b) => c) => (_: [a, b]) => c

The call uncurry(f,[x,y]) has the same value as f(x)(y).

fst: <a, b>(_: [a, b]) => a

Projecting the first component of a pair.

snd: <a, b>(_: [a, b]) => b

Projecting the second component of a pair.