mapForMaybe
Return the result of transformer with using input as an argument for it if input is not null and undefined.
Otherwise, return null or undefined inputted as input.
Umust not beMaybe<*>.- If you'd like return
Maybe<*>asU, useandThen(). - If the result of transformer is
nullorundefined, this throw anError.
- If you'd like return
function mapForMaybe<T, U>(input: Maybe<T>, transformer: TransformFn<T, NotNullOrUndefined<U>>): Maybe<U>;