Returns a collector that returns the element at the specified index.
Type of items in the source.
Index of the element to get.
Collector that returns the element at the specified index.
const result = elementAt<number>(1)([1, 2, 3]);console.log(result); // 2 Copy
const result = elementAt<number>(1)([1, 2, 3]);console.log(result); // 2
Returns a collector that returns the element at the specified index.