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

change function name to match method name #3028

Closed
wants to merge 1 commit into from

Conversation

performantdata
Copy link
Contributor

Change the lambda's name to match that of the corresponding method name (double) in the subsequent example.

Change the lambda's name to match that of the corresponding method name (`double`) in the subsequent example.
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.

I think doubles is the correct name, as you get doubles after the map has executed.
Maybe further down this line val doubles = nums.filter(underFive).map(double) could change to val doublesUnderFive = nums.filter(underFive).map(double).

@performantdata
Copy link
Contributor Author

@Philippus I think double is correct, as a verb that names the action that the function performs. But I don't disagree with this:

val doubles = nums.filter(underFive).map(double) could change to val doublesUnderFive = nums.filter(underFive).map(double).

Go with that if you want.

double also appears as the function name further down the page.

@bishabosha
Copy link
Member

bishabosha commented Jun 18, 2024

this change (aesthetic choice) does not bring value. perhaps find a grammar/spelling/syntax mistake

@bishabosha bishabosha closed this Jun 18, 2024
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.

None yet

3 participants