Skip to content

Commit

Permalink
add flatMap to the set
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelchassot committed Oct 11, 2024
1 parent fbdd54b commit d8939b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frontends/library/stainless/lang/Set.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ object Set {
new Set(set.theSet.map(f))
}

@extern @pure
def flatMap[B](f: A => Set[B]): Set[B] = {
new Set(set.theSet.flatMap(f(_).theSet))
}

@extern @pure
def mapPost1[B](f: A => B)(a: A): Unit = {
()
Expand Down

0 comments on commit d8939b6

Please sign in to comment.