Michael Bull
Michael Bull
Another alternative: now that Kotlin 2.1 has landed [1] (albeit in preview) that supports non-local `break` and `continue`, the building-block functions like `fold` and `getOrElse` should be a lot less...
@Shykial Thanks for your kind words. Preventing library consumers from accessing the underlying value prevents them from writing their own Result extension methods. For example, if you wanted to implement...
> The number of exposed APIs by the library is rather big and I think it should be all that's needed for users to come up with their own functions/extensions....
> Any update on this issue? We've migrated to v2, but this issue is forcing us to downgrade to v1 until it gets a fix. 1. https://github.com/michaelbull/kotlin-result/issues/104#issuecomment-2557940658 2. https://github.com/michaelbull/kotlin-result/issues/104#issuecomment-2605025808
Thanks to @hoc081098's hard work in https://github.com/michaelbull/kotlin-result/pull/123, this should now be solved gracefully in db45c677ff77d581bd08168d81df8ee5ab2c391b. This functionality will be available in the next release, `2.1.0`. Consumers will now need to...
> we've been using this great library for cca two years and it's fast become invaluable to us - I can't imagine wrinting my could without it any more. Awesome...
Thanks for the PR. Please can you explain why `EXACTLY_ONCE` is wrong? The [`InvocationKind`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.contracts/-invocation-kind/) contract specifically refers to the amount of times that the function parameter is called, not every...
Does that example picture compile without the contract? If we don't tell the compiler it will be executed at all with an `InvocationKind` contract, then how does it know that...
IntelliJ with K2 mode enabled has indeed started issuing warnings confirming that you were correct @Daiji256 - seems my understanding was wrong. Merged in 4a0c7ddc1e7235ee4cc9b68520fbd3f65c7d1720.
Released in 2.0.1.