fork download
  1. a = {{a=1, b=2}, {a=2, b=3}, {a=1, b=2}, {a=3, b=2}, {a=1, b=2}}
  2.  
  3. for i = #a, 2, -1 do
  4. for j = i - 1, 1, -1 do
  5. if (a[j].a == a[i].a and a[j].b == a[i].b) then
  6. table.remove(a, i)
  7. break
  8. end
  9. end
  10. end
  11.  
  12. -- demonstração do resultado:
  13. for i, j in pairs(a) do
  14. print(i .. ". a=" .. j.a .. ", b=" .. j.b)
  15. end
  16.  
  17. --https://pt.stackoverflow.com/q/38705/101
Success #stdin #stdout 0s 14112KB
stdin
Standard input is empty
stdout
1. a=1, b=2
2. a=2, b=3
3. a=3, b=2