Skip to content

Parse argument lists into placeholders and arguments - #26

Closed
thekid wants to merge 1 commit into
masterfrom
feature/partial-application
Closed

Parse argument lists into placeholders and arguments#26
thekid wants to merge 1 commit into
masterfrom
feature/partial-application

Conversation

@thekid

@thekidthekid commented Jun 27, 2021

Copy link
Copy Markdown
Member
// Parsed into new InvokeExpression(new Literal('strlen'), [new Literal('"Test"')])// Returns int(4)strlen('Test'); // Parsed into new PartialExpression([0 => false], new InvokeExpression(new Literal('strlen'), [null])// Returns a closure equivalent to fn($_0) => strlen($_0)
strlen(?); // Parsed into new PartialExpression([0 => true], new InvokeExpression(new Literal('strlen'), [null])// Returns a closure equivalent to fn(... $_0) => strlen(...$_0)strlen(...);

See https://wiki.php.net/rfc/partial_function_application

@thekid

Copy link
Copy Markdown
MemberAuthor

RFC has been declined

@thekidthekid closed this Jul 2, 2021
@thekid
thekid deleted the feature/partial-application branch July 2, 2021 18:51
Sign up for freeto 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.

1 participant

@thekid