We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrow version: 1.1.6-alpha.36
I miss something like the following:
public suspend inline fun <E, A> Effect<E, A>.getOrElse(crossinline onRaise: (E) -> A): A = fold( { onRaise(it) }, ::identity)
Sample usage:
context(Raise<String>) suspend fun f1() = 1 context(Raise<String>) fun f2(): Nothing = raise("error") runTest { val v1 = effect { f1() }.getOrElse { 33 } assertEquals(1, v1) val v2 = effect { f2() }.getOrElse { 33 } assertEquals(33, v2) }
Related discusson: https://kotlinlang.slack.com/archives/C1JMF6UDV/p1677662786876089
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Arrow version: 1.1.6-alpha.36
I miss something like the following:
Sample usage:
Related discusson: https://kotlinlang.slack.com/archives/C1JMF6UDV/p1677662786876089
The text was updated successfully, but these errors were encountered: