robrix / Prelude

Swift µframework of simple functional programming tools
MIT License
409 stars 26 forks source link

Tuple extraction operators. #48

Closed nikita-leonov closed 8 years ago

nikita-leonov commented 8 years ago

Sorry that it took so long. It was hard to find even a second recent weeks.

Btw in our code base we have third defined, as well as first & second defined for a three elements tuples. Do you think it can be helpful for other people? Is it a good practice in general to have three elements tuples in a code or it is already a reason to create struct?

Also since we have three elements tuples we have functions dropFirst, dropSecond and dropLast to convert three-element tuple to two-elements tuples. I will be happy to contribute it as well if it lies in a scope of this project.

robrix commented 8 years ago

Sorry that it took so long.

No apology necessary at all. I’m incredibly grateful for your effort! :heart:

I think we can take first and second, and then look at adding third &c. if there’s sufficient motivation—i.e. if folks would use them, we can add them then.

robrix commented 8 years ago

Splendid. There’s nothing I’d change! :grin: Merging!

robrix commented 8 years ago

@nikita-leonov: I’ve added you as a collaborator. We prefer to use PRs for significant changes so others have a chance to review, but this will allow you to tag releases, and will otherwise make anything else you’d like to add a little simpler for you.

Thank you for contributing! :bow: