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

Fix attribution of thin arrow anonymous function #24419

Merged
merged 2 commits into from Nov 23, 2017
Merged

Fix attribution of thin arrow anonymous function #24419

merged 2 commits into from Nov 23, 2017

Conversation

HarrisonGrodin
Copy link
Contributor

Haskell uses -> anonymous functions; Python does not.

Haskell uses `->` anonymous functions; Python does not.
@fredrikekre fredrikekre added the doc This change adds or pertains to documentation label Oct 31, 2017
Copy link
Sponsor Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

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

I wonder how Python got in there for this – that's just flat out wrong, isn't it?

@@ -121,7 +121,7 @@ For users coming to Julia from R, these are some noteworthy differences:
of the form `if cond; statement; end`, `cond && statement` and `!cond || statement`. Assignment
statements in the latter two syntaxes must be explicitly wrapped in parentheses, e.g. `cond && (x = value)`.
* In Julia, `<-`, `<<-` and `->` are not assignment operators.
* Julia's `->` creates an anonymous function, like Python.
* Julia's `->` creates an anonymous function, like Haskell.
Copy link
Contributor

Choose a reason for hiding this comment

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

In Haskell you need an additional \ in the beginning, like \x -> x. So this is slightly misleading.

@ararslan
Copy link
Member

Ruby also uses "stabby lambda," though it swaps the argument order from x->... to ->x{...}. Perhaps worth mentioning Ruby in there as well? (It could be that the original author of that line meant Ruby instead of Python.)

@fredrikekre
Copy link
Member

The section for this is "... users coming to Julia from R" so why even bother mentioning other languages? Is is not enough to say that "Julia's -> creates an anonymous function."

@fredrikekre fredrikekre merged commit 66e399b into JuliaLang:master Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants