# Function map

Core exports - Types, Result<T,E>, errors, and logger Split from index.ts for file size compliance (Issue #285)

- map<T, U, E>(result: Result<T, E>, fn: (value: T) => U): Result<U, E>

  Transforms the success value of a Result using the provided function.

  #### Type Parameters

  - T

    The original success value type

  - U

    The transformed success value type

  - E

    The error value type

  #### Parameters

  - result: Result<T, E>

    The Result to transform

  - fn: (value: T) => U

    The transformation function

  #### Returns Result<U, E>

  A new Result with the transformed value

  - Defined in packages/nexus-agents/src/core/result.ts:88