Implement basic integer math operations

This commit is contained in:
2026-08-01 13:50:24 -05:00
parent e728c3fdfa
commit 6e0eb2786e
8 changed files with 521 additions and 166 deletions

23
HELP.md
View File

@@ -319,6 +319,29 @@ Append the given `value` to the current destructured.
Example: `[foo, bar]` -> `push foo` -> `[foo, bar, foo]`
### Numeric Operations
#### `plus <val>`
Add `val` to the current subject.
Example: `4` -> `add 3` -> `7`
#### `minus <val>`
Subtract `val` from the current subject.
Example: `4` -> `sub 7` -> `-3`
#### `abs`
Take the absolute value of the current subject.
Example: `-3` -> `abs` -> `3`
#### `times <val>`
Multiply the current subject by `val`.
Example: `3` -> `times 4` -> `12`
#### `divide <val>`
Divide the current subject by `val`.
Example: `12` -> `divide 3` -> `4`
### Working with Variables
Variables in `str` start with a dollar sign and may be alphanumeric with underscores (e.g. `$my_var`).