ck/map▲toc

Map

Keys are integers and values may have an arbitrary type.

type mapck/map/map: V -> V<a>

Create an empty map.

Remove a key and the corresponding value from a map. Do nothing if the given key does not exist.

Get the value of a specified key.

Add a key-value pair to a map. If the given key already exists, update the corresponding value.

Check whether a map is empty.

Return the key-value pair of the largest key in a map.

Return the key-value pair of the smallest key in a map.

fun update( t : mapck/map/map: V -> V<a>, k : intstd/core/types/int: V, f : (a) -> e a ) : e mapck/map/map: V -> V<a>

Update the value of a specified key. Do nothing if the key does not exist.

fun update-or-insert( t : mapck/map/map: V -> V<a>, k : intstd/core/types/int: V, f : (a) -> e a, v : a ) : e mapck/map/map: V -> V<a>
private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/corestd/core