We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a25856a commit de96a06Copy full SHA for de96a06
Ordered Set/OrderedSet.swift
@@ -80,7 +80,7 @@ public class OrderedSet<T: Hashable> {
80
}
81
82
// O(1)
83
- // append object (removing any existing other occurence)
+ // append object (removing any existing other occurrence)
84
public func ensure_at_end(_ object: T) {
85
if contains(object) {
86
remove(object)
@@ -89,7 +89,7 @@ public class OrderedSet<T: Hashable> {
89
90
91
// O(n)
92
- // prepend object (removing any existing other occurence)
+ // prepend object (removing any existing other occurrence)
93
public func ensure_at_front(_ object: T) {
94
95
remove(object) // could make this more efficient (at the expense of maintenance complexity) by not delegating to remove() and insert()
0 commit comments