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

    Type Alias Arrow<A>

    Arrow: TypeClass.Category.Category<A> & {
        arr: <B, C>(fn: (b: B) => C) => Get2<A, B, C>;
        split: <B1, C1>(
            arrow1: Get2<A, B1, C1>,
        ) => <B2, C2>(
            arrow2: Get2<A, B2, C2>,
        ) => Get2<A, Tuple.Tuple<B1, B2>, Tuple.Tuple<C1, C2>>;
    }

    A 2-arity kind which can split computation. It useful for receiving any composable computation.

    All instances of arrow a must satisfy the following laws:

    • Identity arrow: a.arr(Func.id) equals to a.identity(),
    • Composition arrow: For all functions f and g; a.arr(Func.compose(f)(g)) equals to a.compose(a.arr(f))(a.arr(g)),
    • Left interchange: For all f; a.split(a.arr(f))(a.identity()) equals to a.arr(a.split(f)(a.identity())),
    • Left composition: For all functions f and g; a.split(Func.compose(f)(g))(a.identity()) equals to a.compose(a.split(f)(a.identity()))(a.split(g)(a.identity())),
    • Extracting first interchange: For all f; a.compose(a.arr(Tuple.first))(a.split(f)(a.identity())) equals to a.compose(f)(a.arr(Tuple.first)),
    • Independence: For all f and g; a.compose(a.arr(Func.split(Func.id)(g)))(a.split(f)(a.identity())) equals to a.compose(a.split(f)(a.identity()))(a.arr(Func.split(Func.id)(g))),
    • Idempotence: a.compose(a.arr(Tuple.assocR))(a.split(a.split(f)(a.identity()))(a.identity())) equals to a.compose(a.split(f)(a.identity()))(a.arr(Tuple.assocR)).

    Type Parameters

    • A

    Type Declaration

    • Readonlyarr: <B, C>(fn: (b: B) => C) => Get2<A, B, C>

      Lifts a function to an arrow.

    • Readonlysplit: <B1, C1>(
          arrow1: Get2<A, B1, C1>,
      ) => <B2, C2>(
          arrow2: Get2<A, B2, C2>,
      ) => Get2<A, Tuple.Tuple<B1, B2>, Tuple.Tuple<C1, C2>>

      Splits two inputs between two arrows.