Result<T> is a built-in in kotlin, but this enforces that the error type is a Throwable
If you fancy that an error could be just a type, not necessarily a Throwable, you might like Result4k - it offers a Result<T,E>
https://github.com/fork-handles/forkhandles/tree/trunk/resul...
disclaimer: I contribute to this.
Nice, what's the KMP plan there?
We currently use https://github.com/michaelbull/kotlin-result , which officially should work on KMP, but has some issues.
In Kotlin, my go-to library is https://arrow-kt.io/