Documentation
pairs :: [a] -> Either Text [(a, a)] Source #
A sort of "self-zip", forming pairs from every two elements in a list.
Fails if there is an uneven number of elements.
unpairs :: [(a, a)] -> [a] Source #
Flatten a list of pairs. Equivalent to:
ps ^.. each . both
both :: (a -> b) -> (a, a) -> (b, b) Source #
Apply a pure function to both elements of a tuple.