Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

andThenForOption

Returns None if the input is None, otherwise calls transformer with the value and returns the result.

XXX: Some languages call this operation flatmap. But we don't provide flatMap() as alias of this function to sort with other APIs.

function andThenForOption<T, U>(input: Option<T>, transformer: OptionTryTransformFn<T, U>): Option<U>;
§
andThenForOption<T, U>(input: Option<T>, transformer: OptionTryTransformFn<T, U>): Option<U>
[src]

§Type Parameters

§Parameters

§
input: Option<T>
[src]
§
transformer: OptionTryTransformFn<T, U>
[src]

§Return Type