You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kovenant is a great library. I love to use it. However, there is a small feature I like I wish you can provide is "unwrap the return Promise of then"
For example, I have two methods
funmethod1() : Promise<String, Exception>{}
funmethod2() : Promise<String, Exception>{}
// currentval p:Promise<Promise<String, Exception>, Exception>= method1().then{ method2() }
// can it just be val p:Promise<String, Exception> = method1().then{ method2() }
Now, I added these extensions in my project to achieve it, but I don't know whether it is a good way to do it and it is a little unclear to use thenFlat instead of then.
@wadehuang36 I'm not sure about the core package, but you can use bind from kovenant-functional. I wish the function was called flatMap instead of bind.
Hey there,
kovenant is a great library. I love to use it. However, there is a small feature I like I wish you can provide is "unwrap the return Promise of then"
For example, I have two methods
Now, I added these extensions in my project to achieve it, but I don't know whether it is a good way to do it and it is a little unclear to use thenFlat instead of then.
The text was updated successfully, but these errors were encountered: