CLOVIS
either
if (some condition) { val left: Either<Failure, DbUser> = UnknownFailure("some message here") .left() left.bind() }
if (some condition) UnknownFailure("message").left().bind()
Either<Failure, Nothing>.
Cody Mikol
Right
Right(Unit)
.void()
Either.conditionally(condition, {err}, {Unit}).bind()
fun validateCondition(foo: Foo) = Either.conditionally(foo.isValid, {UnknownFailure("bar")}, {Unit})
kierans777
if
Either.conditionally
A modern programming language that makes developers happier.