Although a text is always self-evaluating, it is possible to access its content, as a sequence that is, even change it.
It should be noted that the double quotation marks act as parentheses, but prevent against the evaluation of its components.
Example:
x = "abcde"
x\1 // ev. a
x2 // ev. b
...
( x↓ ) // ev. abcde
Removal of repeated components of a sequence
The process is as follows:
The sequence is converted as a whole.
As this set is evaluated, repeated elements are removed.
The resulting expression is converted back to sequence.
The expression is: ( {x↓}↓ )
Example:
(x = (a a b c c c c))
{x↓} // ev. {a a a b c c c c} ev. {a b c}
( {x↓}↓ ) // ev. ( a b c ) ev. abc
Hierarchical hyperaccess
These are hierarchical accesses with a variable number of levels. They are realized by the expression
(x ☆n) or (x ↑star;n)
where n is an integer equal to or greater than zero.
Examples:
(x = (a (b (b (c d))))
〈( v(n) = (x ↓☆n) )〉
v(0) // ev. (a (a (b (c (c d))))
v(1) // ev. a (b (c d))
v(2) // ev. b (c d)
v(3) // ev. c d
v(4) // ev. c d
(x = (a*b + a*c + b*c))
〈( v(n) = (x ↓☆n) )〉
v(0) // ev. (a*b + a*c + b*c)
v(1) // ev. a*b + a*c + b*c
v(2) // ev. a * b a * c b * c
v(3) // ev. a * b a * c b * c
Distribution of repetitions
Corresponds to expressions in which ★n is distributed among the components of an expression. Examples:
[[a b c]★2] // rep. a★2 b★2 c★2 rep. a a b b b c c
[[a b c]★⌊1...3⌋] // rep. a★1 b★2 c★3 rep. a b b b c c c
[[a b]★[1 2]] //rep. a★1 a★2 b★1 b★2 rep. a a a a b b b
Operator substitution
In an expression it is possible to perform substitutions of expressions in general and, therefore, also of operators. Examples:
((a+b+c)/(+° = *°) // ev. a*b*c
(1/5)/(/° = ...°) // ev. 1...5 rep. 12345
(x/3)/(/° = = =°) // ev. x=3
Insertion
Here are some illustrative examples of inserting an element into a sequence.
(x = (a b c d))
x = x/(b = (b u)↓) // insertion of element u after element b
x // ev. (a b u c d)
(x = (a b c d b))
x = x/(b = (b u)↓) // insertion of element u after elements b
x // ev. (a b u c c d b u)
(x = (a b c d))
x = x/(b = (b u v)↓) // insertion of elements u and v after elem. b // ev. (a b u v c d)
(x = (a b c d))
x = (u x↓) // insertion of element u in front of the first element of x
x // ev. (u a b c d)
(x = (a b c d))
x = (x↓ u) // insertion of element u after the last element of x
x // ev. (a b c d u)
Ranges and distribution
You can simplify the specification of expressions with ranges by a distribution operation.
Examples:
(1...3 1 1...9 1...5) eq. ([1...[3 9 5]])
This is a sequence of three ranges, which share the same initial element.
In this case the three ranks share the final element, with the initial elements forming another rank.
(1...3 1...4 1...5) eq. ([1...[3 4 5]]) eq. ([1...[3...5]])
This is a sequence of three ranges that share the same initial element and whose final elements form, in turn, another range.
Ranges of variables
The specification of a range of variables x1 ... xn, can be done as follows:
x1...xn, since (x1+1 = x2), (x2+1 = x3), etc.