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

unit

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

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

Parameters

- type of the value.

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