[erlang-questions] what are ets bags sets and duplicate_bags?
Joe Armstrong
erlang@REDACTED
Tue Feb 13 21:00:52 CET 2007
Help
>From the ets manual page:
* set The table is a set table - one key, one object, no order among
objects. This is the default table type.
* ordered_set The table is a ordered_set table - one key, one
object, ordered in Erlang term order, which is the order implied by
the < and > operators. Tables of this type have a somewhat different
behavior in some situations than tables of the other types.
* bag The table is a bag table which can have many objects, but only
one instance of each object, per key.
* duplicate_bag The table is a duplicate_bag table which can have
many objects, including multiple copies of the same object, per
key.
Is this trying to say that:
{a,1} {b,2} {c,3} is a set
{a,1} {a,2} {b,2} is a bag
{a,1} {a,1}{a,2} {b,3} is a duplicate_bag
?????
/Joe
/Joe
More information about the erlang-questions
mailing list