public static function flatten (array $sequence)
    {
        $flat = array();
        array_walk_recursive($sequence, function ($element) use (&$flat) { $flat []= $element; });
        return $flat;
    }