ndmitchell / extra

Extra Haskell functions
Other
93 stars 37 forks source link

fourth / fifth tuples? #104

Closed liamzee closed 10 months ago

liamzee commented 1 year ago

For completeness's sake, and because there are some libraries that think having long tuples are a good thing (System.Process, I'm looking at you), would it be useful to have support for 4- and 5-tuples?

I can do PR work if you'd like, but it's really trivial fundamentally.

ndmitchell commented 1 year ago

My argument has always been that pairs make a lot of sense, triples are sometimes handy, and by the time you have a four tuple, you probably want to name them. The other issue is that by the time you get to 4/5 you end up with lots of functions, and a very complex naming scheme. So I'd suggest no, and I'd also suggest System.Process have less large tuples...

If you do want a scheme for tuples that scales uniformly, something like lens should work.