Sky.Core.Tuple
Sky.Core.Tuple — helpers for pairs `( a, b )` (Layer 3 Sky source).
Values
first : ( a, b ) -> a
The first element of a pair.
mapBoth : (a -> x) -> (b -> y) -> ( a, b ) -> ( x, y )
Apply one function to each element.
mapFirst : (a -> x) -> ( a, b ) -> ( x, b )
Apply a function to the first element; the second is unchanged.
mapSecond : (b -> y) -> ( a, b ) -> ( a, y )
Apply a function to the second element; the first is unchanged.
pair : a -> b -> ( a, b )
Build a pair. Handy in a pipeline or as a function value:
second : ( a, b ) -> b
The second element of a pair.