Re: [RFC] Callable Types
| From: | Dan Ackroyd | Date: | Sat, 23 Apr 2016 11:18:56 +0000 |
| Subject: | Re: [RFC] Callable Types | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92654@lists.php.net to get a copy of this message | ||
On 22 April 2016 at 05:12, Marcio Almada <marcio.web2@gmail.com> wrote:
> Hello everyone,
>
> We just completed the draft for the "Callable Types" RFC.
There seems to be one thing missing from the RFC; please could you add
an example where the parameter and return types are also 'typed'
callables?
Presumably it would look something like this?
function reduce(int $a, int $b, callable(int, callable(int, int):int
$math):int $reducer): callable(int, int):int {
return $reducer($a, $b);
}
Are there any limits to how far down the callable type can be defined ?
cheers
Dan