Skip to content

More precise wording regarding 'pairs' example #1243

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
Jan 24, 2019

Conversation

fabiopakk
Copy link
Contributor

The second example is stated as "computes all pair ..." however the pair (9, 1), among other valid pairs, is not withing the results. Although (1, 9) is listed, (1, 9) is different than (9, 1). Just remembering that pairs are tuples of size 2 and are ordered, as opposed to a 'pair' in natural language. I changed the code accordingly and tested prior to submission.

The second example is stated as "computes all pair ..." however the pair (9, 1), among other valid pairs, is not withing the results. Although (1, 9)  is listed, (1, 9) is different than (9, 1). Just remembering that pairs are tuples of size 2 and are ordered, as opposed to a 'pair' in natural language. I changed the code accordingly and tested prior to submission.
Copy link
Member

@Philippus Philippus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@SethTisue
Copy link
Member

I'd suggest leaving the code alone and just changing the text as needed, partly because this change results in a very long line, too wide for the site layout.

@fabiopakk
Copy link
Contributor Author

Dear reviewers,

I appreciate your comments. Pondering between changing the code vs changing the text, I chose the former because in this way we have a better separation between two generators (each one introducing a new variable) and a filter involving both generators. Though it is not wrong to restrict the range of a generator with the value of another generator, I feel it is more didactical to introduce generators with two examples that are independent, allowing the filter to connect them.

@SethTisue
Copy link
Member

okay, I don't have a strong feeling either way, but something should be done about the very long line

@SethTisue SethTisue merged commit efe1795 into scala:master Jan 24, 2019
@SethTisue
Copy link
Member

something could be done about the long lines in a separate PR.

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