Container Types
Container types are things like arrays, dictionaries, and sets. all containers are specified using square brackets []
, while the contents (or other factors) determine the type of container
Arrays
An array is simple a list of values inside a container
Note: values do not need commas to separate them. Also arrays can contain objects of different types, though arrays where all values are just a single type will be more efficient. Arrays are 0-indexed (with potentially the option to set an arbitrary index)
TODO->explain how to make matrices and other linear algebra stuff.
Dictionaries
A dictionary is a list of key-value pairs
Again note the lack of a need for comma separation between key-value pairs.
Additionally if you wish, you can define a bi-directional dictionary using a double-ended arrow:
Note: when creating a bidictionary, every arrow must by double-ended. As new elements are added, the bidictionary will maintain the bidirectional links between each element. Regular dictionaries will not maintin such links.
Sets
A set is an unordered collection of elements
Objects
See the entry on Object and Class Types for more details. But breifly, an object can be created by wrapping declarations in a container