Options
All
  • Public
  • Public/Protected
  • All
Menu

Module array/remove

Index

References

Functions

References

Renames and re-exports remove

Functions

  • remove<T>(start: number, count: number, list: ArrayLike<T>): T[]
  • remove<T>(start: number, count: number): (list: ArrayLike<T>) => T[]
  • remove<T>(start: number): CurriedFunction2<number, ArrayLike<T>, T[]>
  • Removes the sub-list of list starting at index start and containing count elements. Note that this is not destructive: it returns a copy of the list with the changes. No lists have been harmed in the application of this function.

    example
     remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]
    

    Type parameters

    • T

    Parameters

    • start: number

      The position to start removing elements

    • count: number

      The number of elements to remove

    • list: ArrayLike<T>

      The list to remove from

    Returns T[]

  • Removes the sub-list of list starting at index start and containing count elements. Note that this is not destructive: it returns a copy of the list with the changes. No lists have been harmed in the application of this function.

    example
     remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]
    

    Type parameters

    • T

    Parameters

    • start: number

      The position to start removing elements

    • count: number

      The number of elements to remove

    Returns (list: ArrayLike<T>) => T[]

      • (list: ArrayLike<T>): T[]
      • Parameters

        • list: ArrayLike<T>

        Returns T[]

  • Removes the sub-list of list starting at index start and containing count elements. Note that this is not destructive: it returns a copy of the list with the changes. No lists have been harmed in the application of this function.

    example
     remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]
    

    Type parameters

    • T

    Parameters

    • start: number

      The position to start removing elements

    Returns CurriedFunction2<number, ArrayLike<T>, T[]>

Generated using TypeDoc