Skip to content

. placeholder lifts outside long string of calls #1449

@edemaine

Description

@edemaine

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions