private function waterfall (array $tasks, array $args)
    {
        $index = 0;

        $next = function () use (&$index, &$tasks, &$next, &$args) {
            if ($index == count($tasks)) { 
                return;
            }
            
            $callback = $this->callOnce(function () use (&$next) {
                $next();
            });

            $tasks[$index++]($callback, ...$args);
        };

        $next();
    }