Function randomInfix

  • Pick an arbitrary infix.

    Type Parameters

    • T

    Parameters

    • x: T[]

      an array

    • n: number = -1

      number of values [-1 ⇒ any]

    • fr: ReadFunction<number> = Math.random

      random number generator ([0, 1))

    Returns T[]

    x[i..j] if n<0; x[i..i+n] otherwise | i, j ∈ 0..|x|

Generated using TypeDoc