Tuple

first : (a1, a2) -> a1

second : (a1, a2) -> a2

mapFirst : (a -> b) -> (a, a2) -> (b, a2)
transform the first value in a tuple

import String

mapFirst String.reverse ("stressed", 16) == ("desserts", 16) mapFirst String.length ("stressed", 16) == (8, 16)

mapSecond : (a -> b) -> (a1, a) -> (a1, b)
transform the second value in a tuple

import String

mapSecond sqrt ("stressed", 16) == ("stressed", 4) mapSecond (\x -> x + 1) ("stressed", 16) == ("stressed", 17)