Remix.run Logo
mg 7 days ago

I'm confused about the rationale behind:

    |> fn($x) => array_column($x, 'tags')
Why is that inlined function necessary? Why not just

    |> array_column(..., 'tags')
?

I mean, I understand that it is because the way this operator was designed. But why?

rafark 7 days ago | parent [-]

> |> array_column(..., 'tags')

This syntax is invalid. But it will be possible next year with the proposed partial function application rfc

array_column(?, 'tags')

https://wiki.php.net/rfc/partial_function_application_v2