all
Deprecated
This API is niche and will be removed in the future. If this method is crucial for you, please let us know on the Arrow Github. Thanks! https://github.com/arrow-kt/arrow/issues Prefer when or fold instead
Replace with
fold({ true }, predicate)Content copied to clipboard
Returns true if Left or returns the result of the application of the given predicate to the Right value.
Example:
Right(12).all { it 10 } // Result: true
Right(7).all { it 10 } // Result: false
val left: Either<Int, Int> = Left(12)
left.all { it 10 } // Result: trueContent copied to clipboard