Skip to content

Commit

Permalink
docs(Either): correct error in getOrElse (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
codymikol authored Oct 24, 2021
1 parent 805ea0d commit 24a71fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,8 @@ public fun <A, B> Either<A, Either<A, B>>.flatten(): Either<A, B> =
*
* Example:
* ```
* Right(12).getOrElse(17) // Result: 12
* Left(12).getOrElse(17) // Result: 17
* Right(12).getOrElse { 17 } // Result: 12
* Left(12).getOrElse { 17 } // Result: 17
* ```
*/
public inline fun <B> Either<*, B>.getOrElse(default: () -> B): B =
Expand Down

0 comments on commit 24a71fc

Please sign in to comment.