Get the initial slice to begin the stack call.

@param  \Closure $destination
@return \Closure
488044
protected function getInitialSlice( Closure $destination )
	{
		return function ( $passable ) use ( $destination )
		{
			try
			{
				return call_user_func( $destination, $passable );
			}
			catch ( \Exception $e )
			{
				if ( is_callable( $this->exceptionHandler ) )
					return call_user_func( $this->exceptionHandler, $passable, $e );
				else
					throw new PipelineException( $e->getMessage(), 0, $e );
			}
			catch ( \Throwable $e )
			{
				if ( is_callable( $this->exceptionHandler ) )
					return call_user_func( $this->exceptionHandler, $passable, new FatalThrowableError( $e ) );
				else
					throw new PipelineException( $e->getMessage(), 0, $e );
			}
		};
	}
754642
private function tabSorter(): Closure
    {
        return static function (ModuleTabInterface $x, ModuleTabInterface $y): int {
            return $x->getTabOrder() <=> $y->getTabOrder();
        };
    }
1072682
protected function getExtender($abstract, Closure $closure)
    {
        // To "extend" a binding, we will grab the old "resolver" Closure and pass it
        // into a new one. The old resolver will be called first and the result is
        // handed off to the "new" resolver, along with this container instance.
        $resolver = $this->bindings[$abstract]['concrete'];

        return function($container) use ($resolver, $closure)
        {
            return $closure($resolver($container), $container);
        };
    }
1146606
public function findDestination($destination)
	{
		if (is_file($destination))
		{
			return $destination;
		}

		if ($location = $this->finder->findFileReversed($destination))
		{
			return $location;
		}

		$paths = $this->finder->getPaths();

		if (empty($paths))
		{
			return false;
		}

		$last = end($paths);

		return $last.ltrim($destination, DIRECTORY_SEPARATOR);
	}
150771
public function newNestedInstance(Closure $closure = null)
    {
        $query = $this->newInstance()->nested();

        if ($closure) {
            call_user_func($closure, $query);
        }

        return $query;
    }
750529
protected function getSlice()
    {
        return function ($stack, $pipe) {
            return function ($passable) use ($stack, $pipe) {
                return call_user_func($pipe, $passable, $stack);
            };
        };
    }
161875
public function backup($destination)
    {
        $args = [
            (string)$destination
        ];
        return null === $this->rpc->query("backupWallet", $args);
    }
374000
public function runInTrans(\Closure $closure) {
        $this->startTrans();
        try {
            $result = $closure();
            $this->commit();
            return $result;
        } catch (\Exception $e) {
            $this->rollback();
            throw $e;
        } catch (\Throwable $e) {
            $this->rollback();
            throw $e;
        }
    }
595152
protected function getSlice()
    {
        return function ($stack, $pipe) {
            return function () use ($stack, $pipe) {
                if ($pipe instanceof Closure) {
                    // If the pipe is an instance of a Closure, we will just call it directly but
                    // otherwise we'll resolve the pipes out of the container and call it with
                    // the appropriate method and arguments, returning the results back out.
                    return call_user_func($pipe, $stack);
                } else {
                    $parameters = [$stack];
                }

                return call_user_func_array([$pipe, $this->method], $parameters);
            };
        };
    }
147626
public function at(\Closure $closure): self
    {
        $arrayy = clone $this;

        foreach ($arrayy->getGenerator() as $key => $value) {
            $closure($value, $key);
        }

        return static::create(
            $arrayy->toArray(),
            $this->iteratorClass,
            false
        );
    }
305933
public function filter(\Closure $closure)
    {
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, $closure));
        return $newInstance;
    }
831466
public function extractFromPath(Closure $next) {
		$locale = $this->request->getUrlParam('locale');
		if ($this->translation->hasLocale($locale)) {
			$this->translation->setLocale($locale);
			$next();
		} else {
			$this->notFound();
		}
	}
735760
public function getFilteredCopy(\Closure $filter)
    {
        $copy = clone $this;
        $filteredData = [];
        foreach ($this->data as $key => $item) {
            if ($filter($item)) {
                $filteredData[$key] = $item;
            }
        }

        $copy->data = $filteredData;
        return $copy;
    }
741782
public function resolveClosure(\Closure $closure)
    {
        $reflection = new \ReflectionFunction($closure);

        $dependencies = $reflection->getParameters();
        $instances = $this->resolveDependencies($dependencies); // Actually resolve the dependencies
        $o = $reflection->invokeArgs($instances);

        return $o;
    }
991273
public function outer_fmap(\Closure $trans) {
        return $this->flightcontrol()->newFDirectory($this, function() use ($trans) {
            return $trans($this->fcontents());
        });
    }
402856
public function checkout($destination)
    {
        $repository = $this->credentials->getCurrentRepository();
        $arguments = array_map([$this, 'quote'], [
            $repository->repository,
            $destination,
        ]);

        // Build flags
        $flags = ['--branch' => $repository->branch];
        if ($this->config->getContextually('vcs.shallow')) {
            $flags['--depth'] = 1;
        }

        return $this->clone($arguments, $flags);
    }
871557
public function withEntryFromClosure(string $key, \Closure $closure): self
    {
        $this->bindings[$key] = $closure;
        return $this;
    }