Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
GoPavel committed Nov 6, 2024
1 parent d745f59 commit ce8ae86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OrderedSet.mo
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ module {
/// Space: `O(1)`, retained memory plus garbage, see the note below.
/// where `m` and `n` denote the number of elements in the sets, and `m <= n`.
///
/// Note: Creates `O(log(n))` temporary objects that will be collected as garbage.
/// Note: Creates `O(m * log(n))` temporary objects that will be collected as garbage.
public func union(s1 : Set<T>, s2 : Set<T>) : Set<T> {
if (size(s1) < size(s2)) {
foldLeft(s1, s2, func(elem : T, acc : Set<T>) : Set<T> { Internal.put(acc, compare, elem) })
Expand Down Expand Up @@ -272,7 +272,7 @@ module {
/// Space: `O(1)`, retained memory plus garbage, see the note below.
/// where `m` and `n` denote the number of elements in the sets, and `m <= n`.
///
/// Note: Creates `O(log(n))` temporary objects that will be collected as garbage.
/// Note: Creates `O(m * log(n))` temporary objects that will be collected as garbage.
public func intersect(s1 : Set<T>, s2 : Set<T>) : Set<T> {
if (size(s1) < size(s2)) {
foldLeft(s1, empty(),
Expand Down Expand Up @@ -318,7 +318,7 @@ module {
/// Space: `O(1)`, retained memory plus garbage, see the note below.
/// where `m` and `n` denote the number of elements in the sets, and `m <= n`.
///
/// Note: Creates `O(log(n))` temporary objects that will be collected as garbage.
/// Note: Creates `O(m * log(n))` temporary objects that will be collected as garbage.
public func diff(s1 : Set<T>, s2 : Set<T>) : Set<T> {
if (size(s1) < size(s2)) {
foldLeft(s1, empty(),
Expand Down

0 comments on commit ce8ae86

Please sign in to comment.