klequis / zz-haskell-notebook

Notes from learning Haskell
1 stars 0 forks source link

Tuple #39

Open klequis opened 2 years ago

klequis commented 2 years ago

A tuple is an ordered grouping of values. In Haskell, you cannot have a tuple with only one element, but there is a “zero” tuple, also called unit or (). The types of the elements of tuples are allowed to vary, so both (String, String) and (Integer, String) are valid tuple types. Tuples in Haskell are the usual means of briefly carrying around multiple values without giving that combination its own name.