Are there languages that have first class associative product / sum types? ie ((a,b),c) = (a,(b,c)) = (a, b, c)
a|(b|c) = (a|b)|c = a|b|c
Conversation
Replying to
Sum types: Typescript, Flow, Ceylon, Dotty
Product types: Not sure - afaik, Idris, Agda, and Lean's sum types associate to the right only
I dunno, associative sums would be kind of hard to work with if they were positional only. Row polymorphism + union operator could work.
2
woops: s/sums/products/
2
Show replies

