add ref function alias to closure from callable

This commit is contained in:
Kacper Donat 2018-09-04 18:39:13 +02:00
parent f8ea3de9f7
commit 822b939ec8

View File

@ -32,6 +32,11 @@ function predicate($predicate): Predicate
}
}
function ref(callable $callable)
{
return \Closure::fromCallable($callable);
}
function not($predicate)
{
return predicate($predicate)->not();