Skip to content

Commit

Permalink
add flatmap to set
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelchassot committed Oct 11, 2024
1 parent fbdd54b commit d7f8c8b
Showing 1 changed file with 5 additions and 0 deletions.
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 d7f8c8b

Please sign in to comment.