Is the best monad sequence syntax (as of 0.11.0) s...
# arrow
b
Is the best monad sequence syntax (as of 0.11.0) still something like:
Copy code
Option.fx {
    val (a) = Some(1)
    val (b) = Some(1 + a)
    val (c) = Some(1 + b)
    a + b + c
}
s
option
instead of
Option.fx
, so something like.
Copy code
option {
    val a = !Some(1)
    val b = !Some(1 + a)
    val c = !Some(1 + b)
    a + b + c
}
operator fun component1
will no longer be supported since it breaks destructuring if nested components.
Copy code
option {
  val ((a, b)) = Some(Pair(1, 2))
  a
}
This ☝️ is not allowed, but the following is.
Copy code
option {
  val (a, b) = !Some(Pair(1, 2))
  a
}
👍 2