public static function merge($arrays)
    {
        $merged = [];

        foreach ($arrays as $array)
        {
            $merged = array_merge($merged, static::flatten($array));
        }

        return static::expand($merged);
    }