purescript-tuples
purescript-tuples copied to clipboard
Contrast different ways to represent Tuples.
It seems easy to mix these up and mistakenly assume they all have the same values and types:
-- Values
Tuple 1 ( Tuple 2 3)
1 /\ 2 /\ 3
tuple3 1 2 3
-- Types
Tuple Int (Tuple Int Int)
Tuple3 Int Int Int
T3 Int Int Int
Also easy to confuse Tuple and Tuple2.
Perhaps add some additional documentation about this, and an explanation on why all of these nested tuples contain a Unit.
Happy to help if this seems like a good addition.