Skip to main content

Basic containers

Set

A set is a container of elements, where an element can only be contained once.

Instructions


Adds an element to a set


Removes an element from a set


Adds or removes an element from a set


Iterates over set elements


Expressions


Adds an element to set


Removes an element from set


Adds or removes an element from set


Tests if set contains an elements


Number of element in set


Makes set from literal


List

A list is a container of elements, where elements are in the order they are added.

Instructions


Adds first element to list


Reverse list's element order


Concatenates two lists


Iterates over list elements


Controls execution flow based on list structure


Expressions


Tests if an element is in list


Number of elements in list


Adds first element to list


Reverse list's element order


Concatenates two lists


Nth element of list


N first elements of list


N last elements of list


Maps list elements


Makes list from literal


Controls expression value based on list structure


Map

A map associates one key to one value.

Besides basic map there are two other maps type:

  • big_map to store large collections of non iterable key-value pairs
  • iterable_big_map for a large iterable collection of key-value pairs

Below is the list of map-related instructions and operators.

Note that for instruction and length builtin are not available for big_map type.

Instructions


Associates key to value


Removes key from map


Adds key or removes key from map


Iterates over map's key-value pairs


Expressions


Returns value associated to key in map


Associates key to value


Removes key from map


Adds key or removes key from map


Tests if a key is in map


Number of keys in map


Makes map from literal


Maps key value pairs in map