Skip to content

Instantly share code, notes, and snippets.

@sata
Created October 1, 2015 17:40
Show Gist options
  • Save sata/c1be3ccd92570459744b to your computer and use it in GitHub Desktop.
Save sata/c1be3ccd92570459744b to your computer and use it in GitHub Desktop.
ets:insert_new behavior
(emacs@mini)1> ets:new(foo, [protected, named_table, ordered_set, {keypos, 1}]).
foo
(emacs@mini)2> ets:insert_new(foo, [{1, a}, {1, b}, {2, c}, {3, d}]).
true
(emacs@mini)3> ets:tab2list(foo).
[{1,b},{2,c},{3,d}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment