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

add Nullable proposal #2675

Merged
merged 12 commits into from
Mar 2, 2022
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package arrow.core.continuations

import arrow.core.Either
import arrow.core.Some
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe
Expand Down Expand Up @@ -111,4 +112,11 @@ class NullableSpec : StringSpec({
string
} shouldBe null
i-walker marked this conversation as resolved.
Show resolved Hide resolved
}

"Either<Nothing, A> short circuit" {
i-walker marked this conversation as resolved.
Show resolved Hide resolved
nullable {
val either: Either<Nothing, Int> = Either.Right(4)
either.bind() + 3
} shouldBe 7
}
})