Constants and Variables

Constants

There are a few constants in Arrex.

ConstantMeaning
'T'True
'F'False
'N'Null/None
'L'Length of X
'I'Index of X in Higher Scope (Defaults to 0)
'tn'Number Type
'ts'String Type
'tb'Bool Type
'ta'Array Type

Understanding I

I has the most variance in what it can mean. In e1(), I is the index of whatever element is being looked at. In o2(), I is 2 because the first element is index 2. In s2(), I is 2 because the first element not included is index 2.

Variables

'x' is the main variable which represents the array parameter, some section of it, or the explicity scoped value from sc(). 'a' and 'b' are also variables that usually are the base array parameter except in the l() function.

arrex.evaluate([1, 2, 3], 'e1(x)') #Returns [1, 2, 3] because x takes the value of 1, 2. and 3 each time.
arrex.evaluate([1, 2, 3], 'sc("Hello", x)') #Returns "Hello" because x is scoped to become "Hello"
arrex.evaluate([1, 2, 3], 'e1(a)') #Returns [[1,2,3], [1,2,3], [1,2,3]]
arrex.evaluate([1, 2, 3], 'l(a+b)') #Returns 6 because it sums the values of x

Types

Operators