Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to shift in Either.kt #3105

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2428,7 +2428,7 @@ public fun <E> E.leftNel(): EitherNel<E, Nothing> =
*
* fun test() {
* val error: Either<String, Int> = Either.Left("error")
* val listOfErrors: Either<List<Char>, Int> = error.recover { shift(it.toList()) }
* val listOfErrors: Either<List<Char>, Int> = error.recover { raise(it.toList()) }
* listOfErrors shouldBe Either.Left(listOf('e', 'r', 'r', 'o', 'r'))
* }
* ```
Expand Down Expand Up @@ -2459,7 +2459,7 @@ public inline fun <E, EE, A> Either<E, A>.recover(@BuilderInference recover: Rai
* val left: Either<Throwable, Int> = Either.catch { throw RuntimeException("Boom!") }
*
* val caught: Either<Nothing, Int> = left.catch { _: RuntimeException -> 1 }
* val failure: Either<String, Int> = left.catch { _: RuntimeException -> shift("failure") }
* val failure: Either<String, Int> = left.catch { _: RuntimeException -> raise("failure") }
*
* shouldThrowUnit<RuntimeException> {
* val caught2: Either<Nothing, Int> = left.catch { _: IllegalStateException -> 1 }
Expand Down