some bug fixes, templated operator method overloading

This commit is contained in:
Nathan Braswell
2015-08-03 18:37:42 -04:00
parent 5c1eeb17b8
commit a4f2febfd5
10 changed files with 164 additions and 59 deletions

View File

@@ -50,6 +50,12 @@ obj set<T> (Object) {
fun contains(item: T): bool {
return data.find(item) != -1
}
fun operator+=(item: T) {
add(item)
}
fun operator+=(items: set<T>) {
add(items)
}
fun add(item: T) {
if (!contains(item))
data.add(item)