Hello Ilija,
Nice addition! I thought about edge cases and what the desired output is
with nested closures?

Example:
<?
$a = function (int $numberA) {
    $b = function (int $numberB) {
        if($numberB < 10) {
            return Closure::current(10);
        }
        return $numberB;
    };
    return $b($numberA) + $numberA;
};

var_dump($a(4));

Reply via email to