Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "hs/array/reduce/index"

Index

Interfaces

Functions

Functions

reduce

  • Works similarly to Array.reduce but accepts hyper-array. It returns a hyper-value that always equals to result of applying Array.reduce method to the original array

    Type parameters

    • T

      type of hyper-array item

    Parameters

    • hs: HyperScope

      HyperScope instance

    • hv: HyperValue<T[]>

      hyper-array

    • reducer: Reducer<T, T>

      function to be called for each item

    Returns HyperValue<T>

  • Works similarly to Array.reduce but accepts hyper-array. It returns a hyper-value that always equals to result of applying Array.reduce method to the original array

    Type parameters

    • T

    • R

      type of reduce function results

    Parameters

    • hs: HyperScope

      HyperScope instance

    • hv: HyperValue<T[]>

      hyper-array

    • reducer: Reducer<T, R>

      function to be called for each item

    • initial: R

    Returns HyperValue<R>

Generated using TypeDoc