Composition Expressions
A composition expression consists of two other expressions, separated by whitespace. The output of the first expression is then used as the input to the other. By adding another expression at the end, you again create a larger composition expression, and so on.
| Program | Type | Value | Error |
|---|---|---|---|
"abc" | Str | "abc" | |
"abc" codePoints | Arr<Num...> | [97, 98, 99] | |
"abc" codePoints len | Num | 3 | |
"abc" codePoints len *3 | Num | 9 |
Note that when you compose with expressions that ignore their input, such as literals, only the last one has any effect on the output.
| Program | Type | Value | Error |
|---|---|---|---|
1 | Num | 1 | |
1 2 | Num | 2 | |
1 2 3.5 | Num | 3.5 |