conditionally
Deprecated
This API is considered redundant. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer explicit if-else statements, or ensure inside Either DSL
Replace with
if (test) Right(ifTrue()) else Left(ifFalse())Content copied to clipboard
Will create an Either from the result of evaluating the first parameter using the functions provided on second and third parameters. Second parameter represents function for creating an Left in case of a false result of evaluation and third parameter will be used to create a Right in case of a true result.