@mikuroxina/mini-fn
    Preparing search index...

    Type Alias Functor<F>

    A structure which able to lift up in F.

    All instances of the functor f must satisfy the following laws:

    • Identity: f.map((x) => x) equals to (x) => x,
    • Composition: For all a and b; f.map((x) => b(a(x))) equals to (x) => f.map(b)(f.map(a)(x)).
    type Functor<F> = {
        map: <T, U>(fn: (t: T) => U) => (t: Get1<F, T>) => Get1<F, U>;
    }

    Type Parameters

    • F
    Index

    Properties

    Properties

    map: <T, U>(fn: (t: T) => U) => (t: Get1<F, T>) => Get1<F, U>

    Maps the function fn onto F structure.

    Type Declaration

      • <T, U>(fn: (t: T) => U): (t: Get1<F, T>) => Get1<F, U>
      • Type Parameters

        • T
        • U

        Parameters

        • fn: (t: T) => U

          The function to be mapped.

        Returns (t: Get1<F, T>) => Get1<F, U>

        The mapped function.