Доступ к определенному элементу в кортеже

Haskell-новичку, создающему отчеты в. Вопрос такой: In Haskell, we have fst and snd that return the first and the second elements of a 2-tuple. Why don't we have an easy way of accessing the i-th element from any tuple? Right now I have a 3-tuple, I want to read the 1st element and the only way of accomplishing this task is doing pattern-matching trickery. Why can't this be done easier? Or maybe there is some easy way?

34
задан Micha Wiedenmann 25 January 2019 в 07:33
поделиться