Skip to content

Instantly share code, notes, and snippets.

@Adirelle
Created September 15, 2009 17:16
Show Gist options
  • Save Adirelle/187460 to your computer and use it in GitHub Desktop.
Save Adirelle/187460 to your computer and use it in GitHub Desktop.
local p = {}
-- p = {}
updateRecord(p, "A", 1, 2, 3, 4)
-- p = { "A", 1, 2, 3, 4, ["A"] = 1 }
updateRecord(p, "B", 1, 2, 3, 4)
-- p = { "A", 1, 2, 3, 4, "B", 1, 2, 3, 4, ["A"] = 1, ["B"] = 6 }
updateRecord(p, "C", 1, 2, 3, 4)
-- p = { "A", 1, 2, 3, 4, "B", 1, 2, 3, 4, "C", 1, 2, 3, 4, ["A"] = 1, ["B"] = 6, ["C"] = 11 }
removeRecord(p, "B")
-- p = { "A", 1, 2, 3, 4, "C", 1, 2, 3, 4, ["A"] = 1, ["C"] = 11 }
-- ["C"] = 11 !!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment