open static fun <T1 : Any!, T2 : Any!, R : Any!> liftTry(partial: ((T1, T2) -> R)!): ((T1, T2) -> Try<R>!)!
Lifts given partial
into a total function that returns a Try
result.
partial
- ((T1, T2) -> R)!: a function that is not defined for all the values of the domain (e.g. it may throw an exception for some values).
- type of the first argument of the function.
- type of the second argument of the function.
- type of the function result.
Return
((T1, T2) -> Try<R>!)!: a function that applies arguments to the given partial
and returns Try.Success
if the function is defined for the given arguments, and Try.Failure
otherwise.