Module

Data.Tuple

A data type and functions for working with ordered pairs.

#Tuple

data Tuple a b

A simple product type for wrapping a pair of component values.

Constructors

Instances

#fst

fst :: forall a b. Tuple a b -> a

Returns the first component of a tuple.

#snd

snd :: forall a b. Tuple a b -> b

Returns the second component of a tuple.

#curry

curry :: forall a b c. (Tuple a b -> c) -> a -> b -> c

Turn a function that expects a tuple into a function of two arguments.

#uncurry

uncurry :: forall a b c. (a -> b -> c) -> Tuple a b -> c

Turn a function of two arguments into a function that expects a tuple.

#swap

swap :: forall a b. Tuple a b -> Tuple b a

Exchange the first and second components of a tuple.

Modules