Skip to main content
Version: 1.4.0

Sizing

The predefined function Map.size returns the number of bindings (entries) in a given map.

const my_map: map<int,string> = Map.literal(list([[1,"one"],[2,"two"]]));
const size: nat = Map.size(my_map); // == 2

Note: See the predefined namespace Map