Skip to content

Commit

Permalink
Merge pull request #710 from vlovgr/add-eval-flat-map
Browse files Browse the repository at this point in the history
Add ConfigValue#evalFlatMap
  • Loading branch information
vlovgr authored Oct 23, 2023
2 parents ebee7de + 9f9dea4 commit 4b8dabb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/core/shared/src/main/scala/ciris/ConfigValue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ sealed abstract class ConfigValue[+F[_], A] {
case loaded @ Loaded(_, _, _) => loaded
}

/**
* Alias for `evalMap(f).flatten`.
*/
final def evalFlatMap[G[x] >: F[x], B](f: A => G[ConfigValue[G, B]]): ConfigValue[G, B] =
evalMap(f).flatten

/**
* Returns a new [[ConfigValue]] which applies the
* specified effectful function on the value.
Expand Down

0 comments on commit 4b8dabb

Please sign in to comment.