Mercurial > prosody-hg
comparison util/set.lua @ 5814:5cf1c08805fb
Merge 0.9->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 03 Sep 2013 00:20:28 +0100 |
| parents | bd0ff8ae98a8 c888f548876b |
| children | 6e087f3b8f3b |
comparison
equal
deleted
inserted
replaced
| 5809:be997c6a69be | 5814:5cf1c08805fb |
|---|---|
| 89 end | 89 end |
| 90 end | 90 end |
| 91 end | 91 end |
| 92 | 92 |
| 93 function set:include(otherset) | 93 function set:include(otherset) |
| 94 for item in pairs(otherset) do | 94 for item in otherset do |
| 95 items[item] = true; | 95 items[item] = true; |
| 96 end | 96 end |
| 97 end | 97 end |
| 98 | 98 |
| 99 function set:exclude(otherset) | 99 function set:exclude(otherset) |
| 100 for item in pairs(otherset) do | 100 for item in otherset do |
| 101 items[item] = nil; | 101 items[item] = nil; |
| 102 end | 102 end |
| 103 end | 103 end |
| 104 | 104 |
| 105 function set:empty() | 105 function set:empty() |
