Is there an existing combinator or a better way to write ?
def combine[I, A](k: Kleisli[Try, I, A], default: A) : I => A =
k.run.andThen(_.getOrElse(default))
Is there an existing combinator or a better way to write ?
def combine[I, A](k: Kleisli[Try, I, A], default: A) : I => A =
k.run.andThen(_.getOrElse(default))
It is possible to do mapping on monadic value using Identity:
Example: