diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-09-12 08:25:21 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-09-12 08:51:53 +0200 |
commit | cff41b52e0f801eede5428d97686661b95b9756a (patch) | |
tree | f2b77e0058378d4c269d344dbb8c34979d3d82d1 /reference.md | |
parent | 78a145a5bb77b73f5fbefb0efa2d188926eb55ef (diff) |
Fix `roll` and add its more general cousin `rotate`
Diffstat (limited to 'reference.md')
-rw-r--r-- | reference.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/reference.md b/reference.md index 13c7b2f..807664a 100644 --- a/reference.md +++ b/reference.md @@ -35,7 +35,8 @@ n `get` | Get value of variable with name `n` n `swapoutvar` | Get value of variable with name `n`, *moving* onto the stack instead of copying `enterscope` | Enter a function variable scope `leavescope` | Leave a function variable scope -n `roll` | Roll the stack by `n`; positive n: roll OFF top to bottom; negative n: roll off bottom ONTO top +t `roll` | Roll the stack `t` times; positive n: roll off bottom ONTO top (clockwise); negative n: roll OFF top to bottom (anti-clockwise) +n t `rotate` | Rotate the top `n` items of the stack `t` times; positive n: rotate off bottom ONTO top (clockwise); negative n: rotate OFF top to bottom (anti-clockwise) s i `stridx` | Gets the character in string `s` index `i`, leaving `s` on the stack s `strlen` | Gets the length of string `s`, leaving `s` on the stack s a b `substr` | Gets the substring in `s` from index `a` to `b`, `b` exclusive; leaving `s` on the stack |