On 13/12/2021 23:12, Kirill Nesmeyanov wrote:
I'll add that leading optional parameters are needed to implement currying and
partial application.
```
function foo(int $opt = 42, int $req) {}
$foo = curry(foo(...), 23);
// $foo = fn($opt = 42, $req = 23);
```
I'm confused what the optional
On Mon, Dec 13, 2021, at 5:12 PM, Kirill Nesmeyanov wrote:
> I'll add that leading optional parameters are needed to implement
> currying and partial application.
>
> ```
> function foo(int $opt = 42, int $req) {}
>
> $foo = curry(foo(...), 23);
>
> // $foo = fn($opt = 42, $req = 23);
> ```
>
> W
>Вторник, 14 декабря 2021, 12:21 +03:00 от Rowan Tommins
>:
>
>On 13/12/2021 23:12, Kirill Nesmeyanov wrote:
>> I'll add that leading optional parameters are needed to implement currying
>> and partial application.
>>
>> ```
>> function foo(int $opt = 42, int $req) {}
>>
>> $foo = curry(foo(...)