> 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.

# add (Functional Programming) es-toolkit

Creates a function that adds a number to its input. Use it with [`pipe`](https://massaman.dev/reference/fp/pipe.md).

```typescript
const result = pipe(value, add(addend));
```

::: info

This helper is specific to `es-toolkit/fp`. Use it when you want this operation as part of a [`pipe`](https://massaman.dev/reference/fp/pipe.md) pipeline.

:::

## Usage

`add` returns a function that adds `addend` to its input. It is designed for composition: it can transform the value flowing through a [`pipe`](https://massaman.dev/reference/fp/pipe.md), or serve as the callback of a function such as [`map`](https://massaman.dev/reference/fp/map.md).

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

// Transform the piped value.
pipe(3, add(2)); // => 5

// Use as a map callback.
pipe([1, 2, 3], map(add(10))); // => [11, 12, 13]
```

#### Parameters


addendnumberrequired

The number to add to the input.

#### Returns

A function that maps `value` to `value + addend`.

```typescript
(value: number) => number
```


Source: es-toolkit

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