Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Sequence<T>

A Sequence provides a fluent functional API consisting of various intermediate and terminal operations for processing the iterated data. The operations are evaluated lazily to avoid examining all the input data when it's not necessary. Sequences can be iterated only once.

Type parameters

  • T

Hierarchy

  • SequenceOperators<T>
    • Sequence

Index

Properties

iterator: Iterator<T, any, undefined>

Methods

  • all<T>(this: Sequence<T>, predicate: (item: T) => boolean): boolean
  • Returns true if all elements match the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns boolean

  • any<T>(this: Sequence<T>, predicate?: (item: T) => boolean): boolean
  • Returns true if at least one element match the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns boolean

  • asIterable<T>(this: Sequence<T>): Iterable<T>
  • Returns an iterable representation of the sequence.

    Type parameters

    • T

    Parameters

    Returns Iterable<T>

  • associate<T, K, V>(this: Sequence<T>, transform: (value: T) => [K, V]): Map<K, V>
  • Transforms each element into a key-value pair and returns the results as map. In case of duplicate keys the last key-value pair overrides the other.

    Type parameters

    • T

    • K

    • V

    Parameters

    • this: Sequence<T>
    • transform: (value: T) => [K, V]
        • (value: T): [K, V]
        • Parameters

          • value: T

          Returns [K, V]

    Returns Map<K, V>

  • associateBy<K>(keySelector: (value: T) => K): Map<K, T>
  • associateBy<K>(key: K): Map<T[K], T>
  • associateBy<K, V>(keySelector: (value: T) => K, valueTransformer: (value: T) => V): Map<K, V>
  • associateBy<K, V>(key: K, valueTransformer: (value: T) => V): Map<T[K], V>
  • Returns a map consisting of the elements mapped by the given keySelector.

    Type parameters

    • K

    Parameters

    • keySelector: (value: T) => K
        • (value: T): K
        • Parameters

          • value: T

          Returns K

    Returns Map<K, T>

  • Returns a map consisting of the elements indexed by the given key.

    Type parameters

    • K: string | number | symbol

    Parameters

    • key: K

    Returns Map<T[K], T>

  • Returns a map consisting of the elements mapped by the given keySelector. The value is transformed into another value by the valueTransformer.

    Type parameters

    • K

    • V

    Parameters

    • keySelector: (value: T) => K
        • (value: T): K
        • Parameters

          • value: T

          Returns K

    • valueTransformer: (value: T) => V
        • (value: T): V
        • Parameters

          • value: T

          Returns V

    Returns Map<K, V>

  • Returns a map consisting of the elements indexed by the given key. The value is transformed into another value by the valueTransformer.

    Type parameters

    • K: string | number | symbol

    • V

    Parameters

    • key: K
    • valueTransformer: (value: T) => V
        • (value: T): V
        • Parameters

          • value: T

          Returns V

    Returns Map<T[K], V>

  • Returns the average of all numbers of the sequence or NaN if the sequence is empty.

    Parameters

    Returns number

  • chunk<T>(this: Sequence<T>, chunkSize: number): T[][]
  • Splits the elements of the sequence into arrays which length is determined by the given chunkSize and returns all chunks as array.

    Type parameters

    • T

    Parameters

    Returns T[][]

  • contains<T>(this: Sequence<T>, element: T): boolean
  • Returns true if the sequence contains the given element.

    Type parameters

    • T

    Parameters

    Returns boolean

  • count<T>(this: Sequence<T>, predicate?: (item: T) => boolean): number
  • Returns the number of elements of this sequence. If predicate is present, returns the number of elements matching the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns number

  • Returns a new sequence which discards all duplicate elements.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • Returns a new sequence which discards all elements with duplicate items determined by the given selector.

    Type parameters

    • T

    • K

    Parameters

    • this: Sequence<T>
    • selector: (item: T) => K
        • (item: T): K
        • Parameters

          • item: T

          Returns K

    Returns Sequence<T>

  • Returns a new sequence which discards the first n elements;

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • Drops all elements of the sequence as long as the given predicate evaluates to true.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns Sequence<T>

  • elementAt<T>(this: Sequence<T>, index: number): T
  • Returns the element at position index (zero-based) or throws an error if index is out of bounds.

    Type parameters

    • T

    Parameters

    Returns T

  • elementAtOrElse<T>(this: Sequence<T>, index: number, defaultValue: (index: number) => T): T
  • Returns the element at position index (zero-based). If index is out of bounds returns the result of the given defaultValue function.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • index: number
    • defaultValue: (index: number) => T
        • (index: number): T
        • Parameters

          • index: number

          Returns T

    Returns T

  • elementAtOrNull<T>(this: Sequence<T>, index: number): null | T
  • Returns the element at position index (zero-based) or null if index is out of bounds.

    Type parameters

    • T

    Parameters

    Returns null | T

  • Returns a new sequence consisting of all elements that match the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns Sequence<T>

  • filterIndexed<T>(this: Sequence<T>, predicate: (index: number, value: T) => boolean): Sequence<T>
  • Returns a new sequence consisting of all elements that match the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (index: number, value: T) => boolean
        • (index: number, value: T): boolean
        • Parameters

          • index: number
          • value: T

          Returns boolean

    Returns Sequence<T>

  • Returns a new sequence consisting of all elements that don't match the given predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns Sequence<T>

  • Returns a new sequence consisting of all non-null elements.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • find<T>(this: Sequence<T>, predicate?: (item: T) => boolean): null | T
  • Returns the first element of the sequence or the first element matching predicate if present, otherwise returns null.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns null | T

  • findLast<T>(this: Sequence<T>, predicate?: (value: T) => boolean): null | T
  • Returns the last element of the sequence or the last element matching predicate if present, otherwise returns null.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns null | T

  • first<T>(this: Sequence<T>, predicate?: (item: T) => boolean): T
  • Returns the first element of the sequence or the first element matching predicate if present, otherwise throws an error.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns T

  • firstOrNull<T>(this: Sequence<T>, predicate?: (item: T) => boolean): null | T
  • Returns the first element of the sequence or the first element matching predicate if present, otherwise returns null.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns null | T

  • Transforms each element into a sequence of items and returns a flat single sequence of all those items.

    Type parameters

    • S

    • T

    Parameters

    Returns Sequence<T>

  • Returns a single flat sequence of all the items from all sequences or iterables.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • fold<T, R>(this: Sequence<T>, initial: R, operation: (acc: R, element: T) => R): R
  • Accumulates all elements of the sequence into a single result by applying the given operation starting with the initial value. The result of the last operation will be passed as accumulated value to the getNext invocation of the operation until all elements of the sequence are processed.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • initial: R
    • operation: (acc: R, element: T) => R
        • (acc: R, element: T): R
        • Parameters

          • acc: R
          • element: T

          Returns R

    Returns R

  • foldIndexed<T, R>(this: Sequence<T>, initial: R, operation: (index: number, acc: R, element: T) => R): R
  • Accumulates all elements of the sequence into a single result by applying the given operation starting with the initial value. The result of the last operation will be passed as accumulated value to the getNext invocation of the operation as well as the index of the current element (zero-based) until all elements of the sequence are processed.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • initial: R
    • operation: (index: number, acc: R, element: T) => R
        • (index: number, acc: R, element: T): R
        • Parameters

          • index: number
          • acc: R
          • element: T

          Returns R

    Returns R

  • forEach<T>(this: Sequence<T>, action: (item: T) => void): void
  • Performs the given action (side-effect) for each element of the sequence.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • action: (item: T) => void
        • (item: T): void
        • Parameters

          • item: T

          Returns void

    Returns void

  • forEachIndexed<T>(this: Sequence<T>, action: (index: number, value: T) => void): void
  • Performs the given action (side-effect) for each element of the sequence and passes the index of the current element (zero-based).

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • action: (index: number, value: T) => void
        • (index: number, value: T): void
        • Parameters

          • index: number
          • value: T

          Returns void

    Returns void

  • groupBy<T, K>(this: Sequence<T>, keySelector: (value: T) => K): Map<K, T[]>
  • Groups all elements of the sequence into a map. Keys are determined by the given keySelector function.

    Type parameters

    • T

    • K

    Parameters

    • this: Sequence<T>
    • keySelector: (value: T) => K
        • (value: T): K
        • Parameters

          • value: T

          Returns K

    Returns Map<K, T[]>

  • indexOf<T>(this: Sequence<T>, element: T): number
  • Returns the zero-based index of the given element or -1 if the sequence does not contain the element.

    Type parameters

    • T

    Parameters

    Returns number

  • indexOfFirst<T>(this: Sequence<T>, predicate: (value: T) => boolean): number
  • Returns the zero-based index of the first element matching the given predicate or -1 if no element matches the predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns number

  • indexOfLast<T>(this: Sequence<T>, predicate: (value: T) => boolean): number
  • Returns the zero-based index of the last element matching the given predicate or -1 if no element matches the predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns number

  • joinTo<T>(this: Sequence<T>, config?: JoinConfig<T>): string
  • Joins all elements of the sequence into a string with the given configuration.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • config: JoinConfig<T> = defaults

    Returns string

  • joinToString<T>(this: Sequence<T>, config?: JoinConfig<T>): string
  • Joins all elements of the sequence into a string with the given configuration.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • config: JoinConfig<T> = defaults

    Returns string

  • last<T>(this: Sequence<T>, predicate?: (value: T) => boolean): T
  • Returns the last element of the sequence or the last element matching predicate if present, otherwise throws an error.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns T

  • lastOrNull<T>(this: Sequence<T>, predicate?: (value: T) => boolean): null | T
  • Returns the last element of the sequence or the last element matching predicate if present, otherwise returns null.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns null | T

  • Transforms each element into another value by applying the given transform function and returns a new sequence.

    Type parameters

    • S

    • T

    Parameters

    • this: Sequence<S>
    • transform: (element: S) => T
        • (element: S): T
        • Parameters

          • element: S

          Returns T

    Returns Sequence<T>

  • mapIndexed<T, R>(this: Sequence<T>, transform: (index: number, value: T) => R): Sequence<R>
  • Transforms each element into another value by applying the given transform function and returns a new sequence.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • transform: (index: number, value: T) => R
        • (index: number, value: T): R
        • Parameters

          • index: number
          • value: T

          Returns R

    Returns Sequence<R>

  • mapNotNull<T, R>(this: Sequence<T>, transform: (value: T) => null | R): Sequence<R>
  • Transforms each element into another value by applying the given transform function and returns a new sequence. Transformations into null values are discarded.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • transform: (value: T) => null | R
        • (value: T): null | R
        • Parameters

          • value: T

          Returns null | R

    Returns Sequence<R>

  • Returns the maximum element of the sequence or null if sequence is empty.

    Type parameters

    • T

    Parameters

    Returns null | T

  • maxBy<T, R>(this: Sequence<T>, selector: (value: T) => R): null | T
  • Returns the maximum element by comparing the results of the given selector function for each element of the sequence or null if the sequence is empty.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • selector: (value: T) => R
        • (value: T): R
        • Parameters

          • value: T

          Returns R

    Returns null | T

  • maxWith<T>(this: Sequence<T>, compare: (a: T, b: T) => number): null | T
  • Returns the maximum element of the sequence by evaluating the given compare function or null if sequence is empty.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • compare: (a: T, b: T) => number
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns null | T

  • merge<T, S>(this: Sequence<T>, other: Sequence<T> | Iterable<T>, selector: (value: T) => S, prependNewValues?: boolean): Sequence<T>
  • Merges the elements of both sequences into a new sequence. Each element of this sequence is eventually replaced with an element of the other sequence by comparing results of the given selector function. If no value is found in the other sequence the element is retained. New elements of the other sequence are appended to the end of the new sequence or prepended to the start of the new sequence, if prependNewValues is set to true. This operation is not lazy evaluated.

    Type parameters

    • T

    • S

    Parameters

    • this: Sequence<T>
    • other: Sequence<T> | Iterable<T>
    • selector: (value: T) => S
        • (value: T): S
        • Parameters

          • value: T

          Returns S

    • prependNewValues: boolean = false

    Returns Sequence<T>

  • Returns the minimum element of the sequence or null if sequence is empty.

    Type parameters

    • T

    Parameters

    Returns null | T

  • minBy<T, R>(this: Sequence<T>, selector: (value: T) => R): null | T
  • Returns the minimum element by comparing the results of the given selector function for each element of the sequence or null if the sequence is empty.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • selector: (value: T) => R
        • (value: T): R
        • Parameters

          • value: T

          Returns R

    Returns null | T

  • minWith<T>(this: Sequence<T>, compare: (a: T, b: T) => number): null | T
  • Returns the minimum element of the sequence by evaluating the given compare function or null if sequence is empty.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • compare: (a: T, b: T) => number
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns null | T

  • Removes the given data and returns a new sequence. Data can either be a single element, an array of elements or a sequence of elements.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • none<T>(this: Sequence<T>, predicate?: (value: T) => boolean): boolean
  • Returns true if no element match the given predicate or if the sequence is empty if no predicate is present.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns boolean

  • Performs the given action for each element and returns the sequence.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • action: (value: T) => void
        • (value: T): void
        • Parameters

          • value: T

          Returns void

    Returns Sequence<T>

  • partition<T>(this: Sequence<T>, predicate: (value: T) => boolean): { false: T[]; true: T[] }
  • Evaluates the given predicate for each element of the sequence and assorts each element into one of two lists according to the result of the predicate. Returns both lists as an object.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns { false: T[]; true: T[] }

    • false: T[]
    • true: T[]
  • Appends the given element to the end of the sequence and returns a new sequence.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • Appends the given array to the end of the sequence and returns a new sequence.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • Appends the given sequence to the end of the sequence and returns a new sequence.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • reduce<S, T>(this: Sequence<T>, operation: (acc: S, value: T) => S): S
  • Reduces the whole sequence to a single value by invoking operation with each element from left to right. For every invocation of the operation acc is the result of the last invocation. For the first invocation of the operation acc is the first element of the sequence.

    Type parameters

    • S

    • T

    Parameters

    • this: Sequence<T>
    • operation: (acc: S, value: T) => S
        • (acc: S, value: T): S
        • Parameters

          • acc: S
          • value: T

          Returns S

    Returns S

  • reduceIndexed<S, T>(this: Sequence<T>, operation: (index: number, acc: S, element: T) => S): S
  • Reduces the whole sequence to a single value by invoking operation with each element from left to right. For every invocation of the operation acc is the result of the last invocation. For the first invocation of the operation acc is the first element of the sequence. In addition the index of the current element is also passed to the operation.

    Type parameters

    • S

    • T

    Parameters

    • this: Sequence<T>
    • operation: (index: number, acc: S, element: T) => S
        • (index: number, acc: S, element: T): S
        • Parameters

          • index: number
          • acc: S
          • element: T

          Returns S

    Returns S

  • Returns a new sequence with all elements of the sequence in reverse order.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • single<T>(this: Sequence<T>, predicate?: (value: T) => boolean): T
  • Returns the single element of the sequence or throws error if the sequence has more than one element or none at all. If a predicate is passed returns the single element matching the predicate or throws an error if more or less than one element match the predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns T

  • singleOrNull<T>(this: Sequence<T>, predicate?: (value: T) => boolean): null | T
  • Returns the single element of the sequence or null if the sequence has more than one element or none at all. If a predicate is passed returns the single element matching the predicate or null if more or less than one element match the predicate.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional predicate: (value: T) => boolean
        • (value: T): boolean
        • Parameters

          • value: T

          Returns boolean

    Returns null | T

  • sorted<T>(this: Sequence<T>, composeComparator?: (factory: ComparatorFactory<T>) => Comparator<T>): Sequence<T>
  • Returns a new sequence with all elements sorted by the comparator specified by the given composeComparator function or in natural order if no arguments are given.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • Optional composeComparator: (factory: ComparatorFactory<T>) => Comparator<T>
        • (factory: ComparatorFactory<T>): Comparator<T>
        • Parameters

          • factory: ComparatorFactory<T>

          Returns Comparator<T>

    Returns Sequence<T>

  • Returns a new sequence with all elements sorted ascending by the value specified by the given selector function.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • selector: (value: T) => R
        • (value: T): R
        • Parameters

          • value: T

          Returns R

    Returns Sequence<T>

  • sortedByDescending<T, R>(this: Sequence<T>, selector: (value: T) => R): Sequence<T>
  • Returns a new sequence with all elements sorted descending by the value specified by the given selector function.

    Type parameters

    • T

    • R

    Parameters

    • this: Sequence<T>
    • selector: (value: T) => R
        • (value: T): R
        • Parameters

          • value: T

          Returns R

    Returns Sequence<T>

  • Returns a new sequence with all elements sorted in reverse (descending) natural order.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • sortedWith<T>(this: Sequence<T>, comparison: (a: T, b: T) => number): Sequence<T>
  • Returns a new sequence with all elements sorted be the given compare function.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • comparison: (a: T, b: T) => number
        • (a: T, b: T): number
        • Parameters

          • a: T
          • b: T

          Returns number

    Returns Sequence<T>

  • Returns the sum of all numbers.

    Parameters

    Returns number

  • sumBy<T>(this: Sequence<T>, selector: (value: T) => number): number
  • Returns the sum of all numbers specified by the given selector function.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • selector: (value: T) => number
        • (value: T): number
        • Parameters

          • value: T

          Returns number

    Returns number

  • Returns a new sequence consisting of the first n elements. All other elements are discarded.

    Type parameters

    • T

    Parameters

    Returns Sequence<T>

  • Takes all elements of the sequence as long as the given predicate evaluates to true.

    Type parameters

    • T

    Parameters

    • this: Sequence<T>
    • predicate: (item: T) => boolean
        • (item: T): boolean
        • Parameters

          • item: T

          Returns boolean

    Returns Sequence<T>

  • toArray<T>(this: Sequence<T>, array?: T[]): T[]
  • Returns all elements of the sequence as array. If an array is passed the elements are appended to the end of the array.

    Type parameters

    • T

    Parameters

    Returns T[]

  • toList<T>(this: Sequence<T>, array?: T[]): T[]
  • Returns all elements of the sequence as array. If an array is passed the elements are appended to the end of the array.

    Type parameters

    • T

    Parameters

    Returns T[]

  • toMap<K, V>(this: Sequence<[K, V]>, map?: Map<K, V>): Map<K, V>
  • Returns a map consisting of each key-value pair. If a map is passed the pairs are set on this map. Duplicate keys override each other.

    Type parameters

    • K

    • V

    Parameters

    • this: Sequence<[K, V]>
    • Optional map: Map<K, V>

    Returns Map<K, V>

  • toSet<T>(this: Sequence<T>, set?: Set<T>): Set<T>
  • Returns all elements of the sequence as set. If a set is passed the elements are added to this set.

    Type parameters

    • T

    Parameters

    Returns Set<T>

  • unzip<T, S>(this: Sequence<[T, S]>): [T[], S[]]
  • Returns a pair of arrays where the first array contains all first values and the second array all second values from each input pair of the sequence.

    Type parameters

    • T

    • S

    Parameters

    Returns [T[], S[]]

  • Returns a new sequence consisting of indexed values for all original elements.

    Type parameters

    • T

    Parameters

    Returns Sequence<IndexedValue<T>>

  • Returns a new sequence consisting of pairs built the elements of both sequences with the same index. The resulting sequence has the length of the shortest input sequence. All other elements are discarded.

    Type parameters

    • T

    • S

    Parameters

    Returns Sequence<[T, S]>