public static function compose(callable ...$callables) : \Closure
    {
        // Reverse the order of the given callables outside of the Closure. With the assumption
        // the Closure may get invoked n > 1 times, this shaves off some execution time.
        $callables = array_reverse($callables);

        return function(...$args) use ($callables) {
            foreach ($callables as $callable) {
                $args = [$callable(...$args)];
            }

            return current($args);
        };
    }