Bob Glamm
01/27/2021, 3:46 AMOption.fx {
val (a) = Some(1)
val (b) = Some(1 + a)
val (c) = Some(1 + b)
a + b + c
}
simon.vergauwen
01/27/2021, 8:27 AMoption
instead of Option.fx
, so something like.
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.
option {
val ((a, b)) = Some(Pair(1, 2))
a
}
This ☝️ is not allowed, but the following is.
option {
val (a, b) = !Some(Pair(1, 2))
a
}