about summary refs log tree commit diff stats
path: root/life.tlv
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-18 20:55:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-03-18 20:55:07 -0700
commitc21cefa8881fbcdbff3206a223cbf58f0e07e5fd (patch)
tree66865869280a886a91e254bdaf8e5a030c27a65e /life.tlv
parenta05f713dc11a543ea97c1160990552260618f629 (diff)
downloadteliva-c21cefa8881fbcdbff3206a223cbf58f0e07e5fd.tar.gz
idiom: table.insert for appending
Stop using arr[#arr+1].
Diffstat (limited to 'life.tlv')
-rw-r--r--life.tlv2
1 files changed, 1 insertions, 1 deletions
diff --git a/life.tlv b/life.tlv
index 96f5451..7680093 100644
--- a/life.tlv
+++ b/life.tlv
@@ -237,7 +237,7 @@
     >-- concatenate list 'elems' into 'l', modifying 'l' in the process
     >function append(l, elems)
     >  for i=1,#elems do
-    >    l[#l+1] = elems[i]
+    >    table.insert(l, elems[i])
     >  end
     >end
 - __teliva_timestamp: original