src/container.c
// Get an item from a map. If no such item exists, raise an error.
Get an item from a map. If no such item exists, raise an error.
Get an item from a map . If no such item exists raise an error .
void *map_at(Map *map, char *key) {
    for (int i = 0; i < map->len; i++) {
        if (!strcmp(vec_at(map->keys, i), key)) {
            return vec_at(map->vals, i);
        }
    }
    error("out of range");
    return NULL;  
}
void * map_at ( Map * map , char * key ) { for ( int i = 0 ; i < map -> len ; i ++ ) { if ( ! strcmp ( vec_at ( map -> keys , i ) , key ) ) { return vec_at ( map -> vals , i ) ; } } error ( " " ) ; return NULL ; }
Get an item from a map.
Get an item from a map .
// unreachable