We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
&
`a${&}b` c // vvv ($) => `a${$}b`(c);
The text was updated successfully, but these errors were encountered:
The fundamental question here is whether & should lift above a function call when it's part of the function. Currently it does:
& x → $ => $(x) &.simplify() x → $ => $.simplify()(x)
We definitely want e.g. &.toUpperCase() to lift above the call, so I think it makes sense.
&.toUpperCase()
Some of this might be related to ongoing discussion in #1450 about call chains, though that was for the . placeholder and this is about &.
.
If you need a way to stop lifting, I recommend do (though the output is pretty verbose here):
do
(do `a${&}b`) c // vvv (()=>{{ return $ => `a${$}b` }})()(c)
Sorry, something went wrong.
I think this is the correct behavior. Another example to illustrate:
items.forEach .add 1 // items.forEach(($) => $.add(1));
No branches or pull requests
The text was updated successfully, but these errors were encountered: