Skip to content
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

Add tuples #112

Closed
wants to merge 2 commits into from
Closed

Add tuples #112

wants to merge 2 commits into from

Conversation

seaneagan
Copy link
Contributor

Could alternatively put these in a separate quiver.tuples library if desired.

Can also increase (or decrease) the maximum tuple length provided (I only need length = 2 right now :) ).

Looking to add this so I can use it to represent Map pairs:

Iterable<Tuple2> pairs(Map map);
Map fromPairs(Iterable<Tuple2> pairs);

And I'd also like to use it to replace IndexedValue:

Iterable<Tuple2<int, dynamic>> enumerate(Iterable iterable);
Stream<Tuple2<int, dynamic>> enumerate(Stream stream);

@justinfagnani
Copy link
Contributor

So we just discussed this PR, and I don't think we want to encourage Pairs/Tuples. Classes are easy enough to create, and we've all seen very nasty uses of them. I wouldn't mind tuples in the language though.

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

Successfully merging this pull request may close these issues.

3 participants