gleam/map

Types

Deprecated: Please use the `gleam/dict` module instead

@deprecated("Please use the `gleam/dict` module instead")
pub type Map(key, value) =
  dict.Dict(key, value)

Functions

pub fn delete(from map: Dict(a, b), delete key: a) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn drop(
  from map: Dict(a, b),
  drop disallowed_keys: List(a),
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn filter(
  in map: Dict(a, b),
  keeping predicate: fn(a, b) -> Bool,
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn fold(
  over map: Dict(a, b),
  from initial: c,
  with fun: fn(c, a, b) -> c,
) -> c

Deprecated: Please use the `gleam/dict` module instead

pub fn from_list(list: List(#(a, b))) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn get(from: Dict(a, b), get: a) -> Result(b, Nil)

Deprecated: Please use the `gleam/dict` module instead

pub fn has_key(map: Dict(a, b), key: a) -> Bool

Deprecated: Please use the `gleam/dict` module instead

pub fn insert(
  into map: Dict(a, b),
  for key: a,
  insert value: b,
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn keys(map: Dict(a, b)) -> List(a)

Deprecated: Please use the `gleam/dict` module instead

pub fn map_values(
  in map: Dict(a, b),
  with fun: fn(a, b) -> c,
) -> Dict(a, c)

Deprecated: Please use the `gleam/dict` module instead

pub fn merge(
  into map: Dict(a, b),
  from new_entries: Dict(a, b),
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn new() -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn size(map: Dict(a, b)) -> Int

Deprecated: Please use the `gleam/dict` module instead

pub fn take(
  from map: Dict(a, b),
  keeping desired_keys: List(a),
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn to_list(map: Dict(a, b)) -> List(#(a, b))

Deprecated: Please use the `gleam/dict` module instead

pub fn update(
  in map: Dict(a, b),
  update key: a,
  with fun: fn(Option(b)) -> b,
) -> Dict(a, b)

Deprecated: Please use the `gleam/dict` module instead

pub fn values(map: Dict(a, b)) -> List(b)

Deprecated: Please use the `gleam/dict` module instead

Search Document