From 6caa05788b7dd7f59d863e9774b7f61d534cd1fc Mon Sep 17 00:00:00 2001 From: elioat Date: Sun, 9 Jun 2024 17:21:31 -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 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 -- cgit 1.4.1-2-gfad0 lass='sub right'>Kartik K. Agaram <vc@akkartik.com>
about summary refs log tree commit diff stats
path: root/002test.cc
blob: f25e331f22fb07b6493abcf58841350e15f6aa34 (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111