# ยค aboth, mapPair, et al

Various utility functions for pairs and lists
## Types

aboth :: (`t` -> `b`) -> (`t`, `t`) -> (`b`, `b`)
mapPair :: (`t1` -> `a`, `t2` -> `b`) -> (`t1`, `t2`) -> (`a`, `b`)
pairwith :: (`t` -> `b`) -> `t` -> (`t`, `b`)
swap :: (`b`, `a`) -> (`a`, `b`)
pair :: `a` -> `b` -> (`a`, `b`)
oo :: (`t1` -> `t2`) -> (`t3` -> `t4` -> `t1`) -> `t3` -> `t4` -> `t2`
anth :: Int -> (`a` -> `a`) -> [`a`] -> [`a`]
number :: Int -> [`a`] -> [(Int, `a`)]
loop :: (`t` -> `t`) -> `t`
gmap :: Foldable `t1` => (`t2` -> [`a`] -> [`a`]) -> (`t3` -> `t2`) -> `t1` `t3` -> [`a`]
unionmap :: (Foldable `t1`, Eq `a`) => (`t2` -> [`a`]) -> `t1` `t2` -> [`a`]
remove :: Eq `t` => `t` -> [`t`] -> [`t`]
replace :: Eq `a` => (`a`, `b`) -> [(`a`, `b`)] -> [(`a`, `b`)]
lhead :: [`a1`] -> [`a2`] -> [`a2`]
ltail :: [`a1`] -> [`a2`] -> [`a2`]
lsplit :: [`a1`] -> [`a2`] -> ([`a2`], [`a2`])
part :: (`a` -> Bool) -> [`a`] -> ([`a`], [`a`])
issubset :: (Foldable `t1`, Foldable `t2`, Eq `a`) => `t1` `a` -> `t2` `a` -> Bool
segments :: (`a` -> Bool) -> [`a`] -> [[`a`]]
setFst :: (`a1`, `b`) -> `a2` -> (`a2`, `b`)
setSnd :: (`a`, `b1`) -> `b2` -> (`a`, `b2`)

## Description

These are various small utility functions missing from the standard
Haskell libraries.