A structure which can be reduced to an accumulated value, such as list and tree.

Type Parameters

  • T

Hierarchy

Properties

Properties

foldR: (<A, B>(folder) => ((init) => ((data) => B)))

Type declaration

    • <A, B>(folder): ((init) => ((data) => B))
    • Folds the data structure with folder function by right associativity.

      Type Parameters

      • A

      • B

      Parameters

      • folder: ((next) => ((acc) => B))

        The function which takes the next and accumulating value and returns the calculated accumulation.

          • (next): ((acc) => B)
          • Parameters

            • next: A

            Returns ((acc) => B)

              • (acc): B
              • Parameters

                • acc: B

                Returns B

      Returns ((init) => ((data) => B))

      The accumulated result value.

        • (init): ((data) => B)
        • Parameters

          • init: B

          Returns ((data) => B)

            • (data): B
            • Parameters

              Returns B

Generated using TypeDoc