Hello internals!
I'm just wondering why First class callable syntax doesn't allow partial
application?
Recently I stumbled across following scenario where it could be really
useful:
```
public function __invoke(SendOtpCommand $command)
{
$this->cache->get($command->getPhone(), $this->storeOtp($command,
...));
}
private function storeOtp(SendOtpCommand $command, ItemInterface $item)
{
// some logic
}
```
In this example, I supposed that the closure created will accept a single
parameter $item, and when it is called back, method storeOtp will accept
both $command and $item. As it turned out to be, it doesn't really work
this way.
Another simplified example:
```
// partial application
foo(bar(1, ...));
function foo(Closure $closure)
{
$closure(2);
}
function bar(int $a, int $b)
{
var_dump($a, $b); // 1, 2
}
```
Closure in foo accepts only one parameter. But when it is actually
dispatched, bar is called with two arguments.
Are there any pitfalls, which prevent implementation of this nifty feature?