Built-in TypesEdit on GitHub
Grain provides some built-in types to be used throughout your programs.
The type of Grain booleans, i.e. the type of
The type of Grain Unicode characters, i.e.
The type of Grain strings, i.e.
"The quick brown fox jumps over the lazy dog.".
The type of Grain byte sequences.
The type of
void, also known as “unit” or “nothing”.
The type of Grain arrays, i.e.
[> 1, 2, 3]. Arrays are fixed-length and allow for efficient get/set operations at any index.
The type of Grain boxes. Boxes are wrappers that allow the internal data to be swapped during execution.
The type of Grain numbers, i.e.
2/3. Grain numbers can be arbitrarily large integers, floats, or rationals.
The type of arbitrarily large integers, i.e.
The type of 32-bit integers, i.e.
The type of 64-bit integers, i.e.
The type of 32-bit floating-point numbers, i.e.
The type of 64-bit floating-point numbers, i.e.
The type of Grain exceptions. Exceptions represent errors that have occured in a program.