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

    Function foldL

    • Folds the elements of list from left.

      Type Parameters

      • T
      • U

      Parameters

      • f: (a: U) => (b: T) => U

        The fold operation.

      Returns (init: U) => (list: List.List<T>) => U

      The folded value.

      Examples

      expect(
      foldL((x: string) => (y: string) => y + x)("")(fromString("hoge")),
      ).toStrictEqual(
      "egoh",
      );
      expect(
      foldL((x: string) => (y: string) => y + x)("")(fromString("")),
      ).toStrictEqual(
      "",
      );