public static function mapList( $list, $map, ?string $key = null ): array {

    if( !static::is( $list, true ) ) throw new \TypeError( 'The $list must be iterable' );
    else {

      $_list = [];
      foreach( $list as $index => $item ) {

        if( !static::is( $item, false, true ) ) throw new \TypeError( 'All $list element must be arraylike' );
        else {

          $_key = $key ? $item[ $key ] : $index;
          if( !static::is( $map, true, true ) ) $_list[ $_key ] = $item[ $map ] ?? null;
          else $_list[ $_key ] = static::map( $item, [], $map );
        }
      }

      return $_list;
    }
  }