Skip to content

Commit

Permalink
Rename insert() functions (#47)
Browse files Browse the repository at this point in the history
* Rename 'insert()' functions

* Misc
  • Loading branch information
rvanasa authored Dec 19, 2024
1 parent d6f3ab0 commit 1399d53
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Map.mo
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ module {
todo()
};

public func insert<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : () {
public func add<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : () {
todo()
};

public func insertTake<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : ?V {
public func put<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : ?V {
todo()
};

Expand Down
2 changes: 1 addition & 1 deletion src/Set.mo
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module {
todo()
};

public func insert<T>(set : Set<T>, item : T, compare : (T, T) -> Order.Order) : () {
public func add<T>(set : Set<T>, item : T, compare : (T, T) -> Order.Order) : () {
todo()
};

Expand Down
4 changes: 2 additions & 2 deletions src/pure/Map.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ module {
todo()
};

public func insert<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : Map<K, V> {
public func add<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : Map<K, V> {
todo()
};

public func insertTake<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : (Map<K, V>, ?V) {
public func put<K, V>(map : Map<K, V>, key : K, value : V, compare : (K, K) -> Order.Order) : (Map<K, V>, ?V) {
todo()
};

Expand Down
2 changes: 1 addition & 1 deletion src/pure/Set.mo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module {
todo()
};

public func insert<T>(set : Set<T>, item : T, compare : (T, T) -> Order.Order) : Set<T> {
public func add<T>(set : Set<T>, item : T, compare : (T, T) -> Order.Order) : Set<T> {
todo()
};

Expand Down

0 comments on commit 1399d53

Please sign in to comment.