Haskell LanguageTuples (Pairs, Triples, ...)


Remarks

  • Haskell does not support tuples with one component natively.

  • Units (written ()) can be understood as tuples with zero components.

  • There are no predefined functions to extract components of tuples with more than two components. If you feel that you need such functions, consider using a custom data type with record labels instead of the tuple type. Then you can use the record labels as functions to extract the components.