antelude-0.1.0: Yet another alternative Prelude for Haskell.
Maintainerdneavesdev@pm.me
Safe HaskellSafe
LanguageGHC2021

Antelude.Tuple.Trio

Description

 
Synopsis

Documentation

type Trio a b c = (a, b, c) Source #

A three-element Tuple

curry :: ((a, b, c) -> d) -> a -> b -> c -> d Source #

convert an uncurried function into a curried function

cycleCCW :: Trio a b c -> Trio b c a Source #

Rotates the item of a Trio Tuple, moving to the left. The first item loops back to the last

cycleCW :: Trio a b c -> Trio c a b Source #

Rotates the item of a Trio Tuple, moving to the right. The last item loops back to the first

first :: Trio a b c -> a Source #

Get the first item of a Trio Tuple

mapFirst :: (a -> z) -> Trio a b c -> Trio z b c Source #

Apply a function to the first item of a Trio Tuple

mapSecond :: (b -> z) -> Trio a b c -> Trio a z c Source #

Apply a function to the second item of a Trio Tuple

mapThird :: (c -> z) -> Trio a b c -> Trio a b z Source #

Apply a function to the third item of a Trio Tuple

pack :: a -> b -> c -> Trio a b c Source #

Pack all three arguments into a Trio Tuple

reverse :: Trio a b c -> Trio c b a Source #

Flip the Trio Tuple around, so the first becomes the last and vice versa.

second :: Trio a b c -> b Source #

Get the second item of a Trio Tuple

third :: Trio a b c -> c Source #

Get the third item of a Trio Tuple

uncurry :: (a -> b -> c -> d) -> (a, b, c) -> d Source #

convert a curried function to a function on a Trio