util/array.lua
changeset 7023 6ab9c691c4c6
parent 7022 abcd5ec3ee41
child 7702 9c40d0be2295
equal deleted inserted replaced
7022:abcd5ec3ee41 7023:6ab9c691c4c6
   126 function array_methods:push(x)
   126 function array_methods:push(x)
   127 	t_insert(self, x);
   127 	t_insert(self, x);
   128 	return self;
   128 	return self;
   129 end
   129 end
   130 
   130 
   131 function array_methods:pop(x)
   131 array_methods.pop = t_remove;
   132 	local v = self[x];
       
   133 	t_remove(self, x);
       
   134 	return v;
       
   135 end
       
   136 
   132 
   137 function array_methods:concat(sep)
   133 function array_methods:concat(sep)
   138 	return t_concat(array.map(self, tostring), sep);
   134 	return t_concat(array.map(self, tostring), sep);
   139 end
   135 end
   140 
   136