reazen / relude

FP-inspired prelude/standard library for ReasonML projects
https://reazen.github.io/relude
MIT License
267 stars 41 forks source link

Add tuple functions first, second etc (a la haskells fst, snd) #305

Closed maxkorp closed 3 years ago

maxkorp commented 3 years ago

After seeing an issue was already made (https://github.com/reazen/relude/issues/303), there are fst and snd for pairs/tuple-2s, but that's it.

I added first, second, third, fourth, and fifth to the appropriate tuple files, as well as tests for all of them.

I can make Tuple2.first and Tuple2.second aliases to fst and snd if preferred.

maxkorp commented 3 years ago

Hrm editing my original description doesn't link up MRs and issues apparently, so for reference.