purescript-tuples icon indicating copy to clipboard operation
purescript-tuples copied to clipboard

Contrast different ways to represent Tuples.

Open milesfrain opened this issue 5 years ago • 0 comments

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.

milesfrain avatar Aug 27 '20 20:08 milesfrain