diff options
author | elioat <hi@eli.li> | 2024-06-09 17:21:31 -0400 |
---|---|---|
committer | elioat <hi@eli.li> | 2024-06-09 17:21:31 -0400 |
commit | 6caa05788b7dd7f59d863e9774b7f61d534cd1fc (patch) | |
tree | 746bba86a36a6cf642a7c01d2b232ab4a7930037 /lua/chupacabra/refcard.md | |
parent | 01327556ef6cb529e99cd56f8bc4d8947d2a622f (diff) | |
download | tour-6caa05788b7dd7f59d863e9774b7f61d534cd1fc.tar.gz |
*
Diffstat (limited to 'lua/chupacabra/refcard.md')
-rw-r--r-- | lua/chupacabra/refcard.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/chupacabra/refcard.md b/lua/chupacabra/refcard.md index daaa7ae..a2b473c 100644 --- a/lua/chupacabra/refcard.md +++ b/lua/chupacabra/refcard.md @@ -10,6 +10,7 @@ Chupacabra is a stack-based programming language/calculator implemented in lua. - **Arrays**: You can push arrays onto the stack. For example, `[1 2 3 4]` pushes the array {1, 2, 3, 4} onto the stack. - **`.`**: The `.` operator pops the top element from the stack and discards it. - **`:`**: The `:` operator duplicates the top element of the stack +- **`?`**: The `?` operator swaps the top two elements of the stack ## Array-first keywords - **`@`**: the `@` keyword allows you to grab a specific value from an array by index, e.g. `[10 20 30] 2 @` would return the value `20`. |