Skip to content

Commit

Permalink
Add ConfigValue#evalFlatMap alias
Browse files Browse the repository at this point in the history
  • Loading branch information
vlovgr committed Oct 22, 2023
1 parent ebee7de commit 9f9dea4
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 9f9dea4

Please sign in to comment.