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

    Type Alias Cat<T>

    Contains a value and can be transformed into another one by feed.

    type Cat<T> = {
        feed: <U>(fn: (t: T) => U) => Cat.Cat<U>;
        value: T;
    }

    Type Parameters

    • T

      Type of value, contained by Cat.

    Index

    Properties

    Properties

    feed: <U>(fn: (t: T) => U) => Cat.Cat<U>

    Feeds a function to the Cat, then Cat creates a new Cat by calling it.

    Type Declaration

      • <U>(fn: (t: T) => U): Cat.Cat<U>
      • Type Parameters

        • U

        Parameters

        • fn: (t: T) => U

          A map function for value, having referential-transparency is expected.

        Returns Cat.Cat<U>

        A new Cat transformed from value by fn.

    value: T

    Contained value. Altering an interior value must be abstained, or may occurs unsound behaviors.