The command line arguments provided to the script.
Returns the absolute of the input.
Returns the absolute of input.
Prints the current internal environment of the interpreter to stdout. This is useful for debugging the interpreter.
Exits the program and interpreter with exitcode 0
.
Exits the program and interpreter with the exitcode specified.
Reads a line from stdin.
If it succeeds the read line will be in the first string and the second one will be nil
.
On error the first one will be nil
and the second one will contain the reason of failure.
Returns the bigger input.
Returns the bigger input.
Returns the smaller input.
Returns the smaller input.
Returns the smaller input.
Returns the smaller input.
Prints the object without a newline to stdout.
(AnyType
is not an actual type but an internal the interpreter uses, so that it can work with any class.)
Prints the object with a newline to stdout.
(AnyType
is not an actual type but an internal the interpreter uses, so that it can work with any class.)
Returns a list starting at 0 up to but not including the input.
Returns a list starting at the first input up to but not including the second input.
Any is not a real type, but the methods in this section hold true for every type (even custom class types).
Returns are string representation of the object.
Returns the absolute of the integer.
Returns the integer converted to a bool.
Returns the integer converted to a float.
Returns the integer converted to a String.
Returns the bool converted to an Int.
Returns the bool converted to a String.
Returns the absolute of the float.
Returns the float converted to a Int.
Returns the float converted to a String.
Returns the square root of the Float.
Returns a capitalized version of the string.
Returns wether or not the string contains the other one.
Returns the character at the index and returns it in a new string.
Returns the length of the string.
Returns a list where each item is a line in the original string.
Returns a version of the string without upper letters.
Returns a tuple where the bool is the parsed bool and the string is nil
if it succeeds.
On error the bool is nil
and the string contains the reason why it failed.
Returns a tuple where the float is the parsed float and the string is nil
if it succeeds.
On error the float is nil
and the string contains the reason why it failed.
Returns a tuple where the integer is the parsed integer and the string is nil
if it succeeds.
On error the integer is nil
and the string contains the reason why it failed.
Splits the string by the separator provided.
Returns a version with all whitespaces at the start and end of the string removed.
Returns a version with all characters capitalized.
Lists are a generic datastructure and with that an exception as Moose doesn't allow you to define custom generic Classes.
Appends the provided item to the end of the list.
Appends the rest the provided list to the end of the first one.
Returns a list where each item is wrapped in a tuple with the first element being the index in the original list and the second being the original item.
Returns a string of the joined list, where each element is converted to String via its represent()
method.
Returns a string of the joined list, where each element is converted to String via its represent()
method.
In addition the first argument is used as seperator between the joined elements.
Returns the item at the provided index.
This method panics with OutOfBoundsPanic
if the item at the index doesn't exist.
There is syntactic sugar for this function:
l = [1, 77, 3, 4]
println(l[1])
Updates the item at the provided index.
This method panics with OutOfBoundsPanic
if the item at the index doesn't exist.
There is syntactic sugar for this function:
l = [1, 77, 3, 4]
l[1] = 2
Returns the length of the list.
Reverses the List in place.
Returns a reversed copy of the list and leaves the original intact.
Dicts are a generic datastructure and with that an exception as Moose doesn't allow you to define custom generic Classes.
Returns the number of key-value pairs.
Converts the dictionary to a list where each item is a tuple with the key and value from the dictionary.
Gets the item with the provided key.
If the key doesn't exist, it will return nil
.
There is syntactic sugar for this function:
dict = {"flo": true, "lisa": false}
println(dict["lisa"])
Updates the provided key with the provided value.
There is syntactic sugar for this function:
dict = {"flo": true, "lisa": false}
dict["luis"] = false
Tuples are a generic datastructure that can hold a arbitrary set of heterogen typed values. Tuples support unpackaging and are the only class that uses numbers as property names.
You can access elements via its indices, but not via index access, instead you use property access.
a = (1, true)
print(a.0) // "1"
print(a.1) // "true"