about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <hi@eli.li>2024-06-09 15:17:49 -0400
committerelioat <hi@eli.li>2024-06-09 15:17:49 -0400
commita461b64cd0996f707914abc7927bb46da8026e46 (patch)
treed771910e6c6959982f088e1e4dbed5fa2d3c7bc5
parentb4370348822081dce9dc97b24d6a447344c82470 (diff)
downloadtour-a461b64cd0996f707914abc7927bb46da8026e46.tar.gz
*
-rw-r--r--lua/chupacabra/test_chupacabra.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/chupacabra/test_chupacabra.lua b/lua/chupacabra/test_chupacabra.lua
index d945009..787accc 100644
--- a/lua/chupacabra/test_chupacabra.lua
+++ b/lua/chupacabra/test_chupacabra.lua
@@ -44,4 +44,5 @@ tc("5 2 - 3 4 * +", 15)  -- (5 - 2) + (3 * 4) = 15
 tc("8 2 / 3 4 * +", 16.0)  -- (8 / 2) + (3 * 4) = 16
 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)
\ No newline at end of file
+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 currently @ consumes the array and doesn't replace it on to the stack
\ No newline at end of file
re>
0c44f591 ^
ca1afb29 ^
8b9f1750 ^
8cb4e365 ^
8cb4e365 ^






795f5244 ^
166e3c0d ^



8cb4e365 ^




1c57bab6 ^

ec99eb7a ^
1c57bab6 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34