two parts as one
( first, second )
Both a first and second part, conveniently represented as a tuple.
Using this type instead of a tuple
visually unifies it with all the other types such as List
, Maybe
, or Result
.
This in my opinion reads a tad better, especially as a type argument:
List (Maybe ( String, Int ))
becomes:
List (Maybe (And String Int))
firstMap : (first -> firstMapped) -> And first second -> And firstMapped second
Change the first part based on its current value
secondMap : (second -> secondMapped) -> And first second -> And first secondMapped
Change the second part based on its current value