https://kotlinlang.org logo
#arrow
Title
r

raulraja

07/04/2018, 1:24 PM
@kluck since your operations are not interdependent there is no need for binding. We only use binding for monadic operations when they are interdependent in their results or in their order:
Copy code
ForOption extensions {
  val op1 = Some(true)
  val op2 = none<Boolean>()
  map(op1, op2, { (o1, o2) -> "result" }).fix().getOrElse { "wrong result" }
}
🔝 3