
Rust-style Result and Option types offering some/none and ok/err constructors, chainable combinators, pattern-friendly APIs and ergonomic error/optional-value handling for safer, expressive code.
Bring the Rust [Result Option] types to Kotlin
Add the dependency to your build.gradle.kts:
dependencies {
implementation("io.github.initdc:types:0.1.0")
}import kt.types.*
val s = some(2)
val n = none<Int>()
val r = ok<Int, String>(2)
val e = err<Int, String>("error")TODO: Write development instructions here
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)Bring the Rust [Result Option] types to Kotlin
Add the dependency to your build.gradle.kts:
dependencies {
implementation("io.github.initdc:types:0.1.0")
}import kt.types.*
val s = some(2)
val n = none<Int>()
val r = ok<Int, String>(2)
val e = err<Int, String>("error")TODO: Write development instructions here
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)