Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "array"

Index

Functions

Functions

Const aseq

  • aseq<T>(buf: Nullable<ArrayLike<T>>, start?: number, end?: undefined | number): ISeq<T> | undefined
  • Returns a zero-copy {@link @thi.ng/api#ISeq} for the given array and optionally for defined index range only.

    remarks

    If given, start MUST be < end. The latter defaults to the end of the array (.length). Also see {@link @thi.ng/arrays#arrayIterator} for related functionality.

    Type parameters

    • T

    Parameters

    • buf: Nullable<ArrayLike<T>>

      array

    • Default value start: number = 0

      start index

    • Optional end: undefined | number

      end index (excluded)

    Returns ISeq<T> | undefined

Const rseq

  • rseq<T>(buf: Nullable<ArrayLike<T>>, start?: undefined | number, end?: number): ISeq<T> | undefined
  • Similar to aseq, returns a zero-copy {@link @thi.ng/api#ISeq} for the given array, though in reverse order and optionally for defined index range only.

    remarks

    If given, start MUST be > end. The latter defaults to beginning of the array (-1). Also see {@link @thi.ng/arrays#arrayIterator} for related functionality.

    Type parameters

    • T

    Parameters

    • buf: Nullable<ArrayLike<T>>

      array

    • Optional start: undefined | number

      start index

    • Default value end: number = -1

      end index (excluded)

    Returns ISeq<T> | undefined

Generated using TypeDoc