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

mapForResult

Maps a Result<T, E> to Result<U, E> by applying a transformer function to an contained Ok(T) value, leaving an Err(E) value untouched.

This function can be used to compose the results of two functions.

function mapForResult<T, U, E>(input: Result<T, E>, transformer: TransformFn<T, U>): Result<U, E>;
§
mapForResult<T, U, E>(input: Result<T, E>, transformer: TransformFn<T, U>): Result<U, E>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
transformer: TransformFn<T, U>
[src]

§Return Type