> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# at (Functional Programming) es-toolkit

Creates a function that returns the values at the given indices. Use it with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
const result = pipe(array, at(indices));
```

::: info

Prefer the original es-toolkit [`at`](https://massaman.dev/reference/array/at.md) in ordinary code. Use this `fp` variant when composing transformations with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

:::

## Usage

`at` reads values from the piped array at each index in `indices`. Negative indices count from the end, matching `Array.prototype.at`.

```typescript
import { at, pipe } from 'es-toolkit/fp';

pipe(['a', 'b', 'c'], at([0, -1])); // => ['a', 'c']
```

#### Parameters


indicesnumber[]required

The indices to read from the piped array.

#### Returns

A function that maps a `readonly T[]` to the selected values.

```typescript
(array: readonly T[]) => T[]
```


Source: es-toolkit

Re-exported verbatim from [`es-toolkit`](https://es-toolkit.dev/fp/reference/at.html). Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.
