Learn: Data Types
The type system of min is very simple – only the following data types are available:
- An integer number like 1, 27 or -15.
- A floating-point number like 3.14 or -56.9876.
- A series of characters wrapped in double quotes: “Hello, World!”.
- A list of elements, which may also contain symbols. Quotations can be be used to create heterogenous lists of elements of any data type, and also to create a block of code that will be evaluated later on (quoted program). Example: (1 2 3 + *)
A key/value table. Dictionaries are implemented as an immediately-dequoted quotation, are enclosed in curly braces, and are represented by their symbol definitions. Note that dictionary keys are symbols and therefore can only contain characters allowed in symbols. The
dictModule provides some operators on dictionaries.
logic Module provides predicate operators to check if an element belong to a particular data type or pseudo-type (
lang Module provides operators to convert values from a data type to another (e.g.
string, and so on).
Most of the operators defined in the
num Module are able to operate on both integers and floats.
→ Continue to Operators