sdk-common / com.tomtom.online.sdk.common.functional / Try / unit

unit

@NonNull open static fun <R : Any!> unit(): (R) -> Try<R>!

Returns a function that takes a value and returns a monad of that value. The returned function will always return a Success regardless of the passed value (even null!).

Parameters

- type of the value.

Return
(R) -> Try<R>!: function that takes a value and returns a monad of that value.