aeruhxi
01/24/2018, 6:53 PMnone()
and None
Option.monad().binding {
val x = none<Int>().bind()
val y = Some(1 + x).bind()
val z = Some(1 + y).bind()
yields(x + y + z)
}
works but
Option.monad().binding {
val x = None.bind()
val y = Some(1 + x).bind()
val z = Some(1 + y).bind()
yields(x + y + z)
}
doesn't compile