From 01327556ef6cb529e99cd56f8bc4d8947d2a622f Mon Sep 17 00:00:00 2001 From: elioat Date: Sun, 9 Jun 2024 15:45:58 -0400 Subject: * --- lua/chupacabra/test_chupacabra.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/chupacabra/test_chupacabra.lua') diff --git a/lua/chupacabra/test_chupacabra.lua b/lua/chupacabra/test_chupacabra.lua index 702c29d..61ff9ef 100644 --- a/lua/chupacabra/test_chupacabra.lua +++ b/lua/chupacabra/test_chupacabra.lua @@ -46,4 +46,5 @@ 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) -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 +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 -- cgit 1.4.1-2-gfad0