-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28bd7f7
commit 4d8b7cb
Showing
2 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
package modularity | ||
|
||
import stainless.collection._ | ||
import stainless.lang._ | ||
import stainless.annotation._ | ||
import stainless.collection.List | ||
import stainless.annotation.mutable | ||
|
||
object MiniMutableSet: | ||
|
||
@mutable | ||
final case class MiniMutSet[V](private var content: List[V]) extends MiniMutableSetInterface.MiniMutableSet[V]: | ||
final case class MiniMutSet[V](private var content: List[V]) extends MiniMutableSetInterface.iMiniMutableSet[V]: | ||
override def contains(v: V): Boolean = content.contains(v) | ||
override def add(v: V): Unit = content = v :: content | ||
override def add(v: V): Unit = { | ||
content = v :: content | ||
}.ensuring(_ => true) | ||
end MiniMutableSet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters