Orasund/leaf-lang/1.0.1

Leaf.Core

This is the core package, it contains all essential functions.

package : Dict String Field

Dict containing all functions in this package, read to be used in Leaf.

Equality and If-Statement

equal : Value -> Value -> Bool

Checks if two values are (structually) equal.

notEqual : Value -> Value -> Bool

Checks if two values are (structually) different.

if_ : Bool -> Value -> Value -> Value

If the first value is true, it returns the second value, else it returns the third value.

Type checking

isBool : Value -> Bool

Checks if a value is a boolean

isExtension : Value -> Bool

Checks if a value is an extension function.

isFloat : Value -> Bool

Checks if a value is a float

isFunction : Value -> Bool

Checks if a value is a function.

isInt : Value -> Bool

Checks if a value is an int

isList : Value -> Bool

Checks if a value is a list. Does not check if all values of the list have the same type.

isNull : Value -> Bool

Checks if a value is null

isObject : Value -> Bool

Checks if a value is an object. This is not useful if you want an object with a specific structure, write your own checker instead.

isString : Value -> Bool

Checks if a value is a string