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

. placeholder lifts outside long string of calls #1449

Open
edemaine opened this issue Oct 10, 2024 · 0 comments · May be fixed by #1450
Open

. placeholder lifts outside long string of calls #1449

edemaine opened this issue Oct 10, 2024 · 0 comments · May be fixed by #1450
Assignees

Comments

@edemaine
Copy link
Collaborator

The docs define . placeholders as follows:

if you use . within a function call, that call gets wrapped in a one-argument function and . gets replaced by that argument

It looks like what actually happens is that . lifts outside the entire CallExpression, no matter how long it is. For example:

Input

f(a)(b)(.)(c)(d)

Current Output

$ => f(a)(b)($)(c)(d)

Expected Output

($ => f(a)(b)($))(c)(d)

I think. The idea is that this expression should be treated as a tree of applications, and this is what you get if you lift the . just above its own application.

#837 (comment) gives a real-world example.

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 a pull request may close this issue.

1 participant