This small pet-project is a library publication training exercise.
Maybe you are looking for Either implementation like Arrows.
There is simplest Either type-class implementation. It's usable just in cases when you'll mark some computation as failure-success dichotomic result.
Available through jitpack.
Add the maven repo to your root build.gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Dependency
implementation "com.github.SiberianPathfinder:Either:{latest-version}"