Function count

  • Count values which satisfy a test.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • ft: TestFunction<T>

      test function (v, i, x)

    Returns number

    Σtᵢ | tᵢ = 1 if ft(vᵢ) else 0; vᵢ ∈ x

Generated using TypeDoc