function cut(array, index) local ar = {} for i, e in array do if i ~= index then ar[i] = e end end return ar end