我们可以bind()
在 Arrow monad 理解中使用的一种方式是“大喊大叫”(第三个示例):
/**
* All possible approaches to running [Kind] in the context of [Fx]
*
* ```
* fx {
* val one = just(1).bind() // using bind
* val (two) = just(one + 1) // using destructuring
* val three = !just(two + 1) // yelling at it
* }
* ```
*/
由于 Kotlin 的!
运算符用于否定布尔值,您能解释一下它在 Arrow 中是如何以及为什么以这种方式工作的吗?