Skip to content

Extensible tuples #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2016
Merged

Extensible tuples #23

merged 1 commit into from
Oct 5, 2016

Conversation

natefaubion
Copy link
Contributor

No description provided.

@natefaubion
Copy link
Contributor Author

I've gone ahead and made curry/uncurry open as well. This means that you can provide a larger tuple through uncurryN, and it only takes the arguments it needs. curryN also lets you provide the tail if the function requires a larger tuple. Closed currying then just becomes applying unit as the first argument. It's kind of like partial application from the right. We can switch these to closed, of course, but I thought it might be worth considering.

@garyb
Copy link
Member

garyb commented Oct 4, 2016

@paf31 I asked Nathan to go ahead and put this together since the work I did on re-associating the Tuples still leaves the behaviour different from Either, in the sense of having combinators that allow accessing arbitrary positions without having to know the length of the nesting.

None of the libraries that depend on tuples have been updated yet, so it's no problem to release another version now and then proceed with the other updates.

@garyb garyb merged commit 1ce53d4 into purescript:master Oct 5, 2016
@paf31
Copy link
Contributor

paf31 commented Oct 5, 2016

Sorry, yes, looks good 😄

@garyb
Copy link
Member

garyb commented Oct 5, 2016

No problem, figured you wouldn't mind - just wanted to let you know what was going on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants