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/test_chupacabra.lua | |
parent | 01327556ef6cb529e99cd56f8bc4d8947d2a622f (diff) | |
download | tour-6caa05788b7dd7f59d863e9774b7f61d534cd1fc.tar.gz |
*
Diffstat (limited to 'lua/chupacabra/test_chupacabra.lua')
-rw-r--r-- | lua/chupacabra/test_chupacabra.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/chupacabra/test_chupacabra.lua b/lua/chupacabra/test_chupacabra.lua index 61ff9ef..0a58cc4 100644 --- a/lua/chupacabra/test_chupacabra.lua +++ b/lua/chupacabra/test_chupacabra.lua @@ -47,4 +47,5 @@ tc("1 2 3 4 5 ..", {1, 2, 3, 4, 5}) -- construct an array tc("[1 2 3 4 5] [6 7 8 9 10] [10 11 12 13] @..", {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13}) -- combine arrays tc("[10 20 30] 1 @", 10) -- access array element at a given index (1-based) tc("[10 20 30] 2 @ 20 +", 40) -- this leaves nothing on the stack, since @ consumes the array and doesn't replace it on to the stack -tc("1 2 3 : +", 6) -- : duplicates the top element on the stack \ No newline at end of file +tc("1 2 3 : +", 6) -- : duplicates the top element on the stack +tc("100 10 20 ?", 10) -- ? swaps the top two elements on the stack \ No newline at end of file |