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

# call

Invokes a function with the provided arguments and returns the result.

Equivalent to `fn(...args)` — exists as a stable, named surface for the
"apply function to args" operation. Use inside `.map(call)` over arrays
of thunks, or anywhere a value-position function-call is clearer than an
inline arrow.

```typescript
call(Math.max, 1, 2, 3) // 3
[getUser, getAccount, getPrefs].map((fn) => call(fn))
```

## Usage

### `call<A extends readonly unknown[], R>(fn: (...args: A) => R, ...args: A)`

Invokes a function with the provided arguments and returns the result.

Equivalent to `fn(...args)` — exists as a stable, named surface for the
"apply function to args" operation. Use inside `.map(call)` over arrays
of thunks, or anywhere a value-position function-call is clearer than an
inline arrow.

```typescript
import { call } from 'massaman'
// or:  import { call } from 'massaman/function'

call(Math.max, 1, 2, 3) // 3
[getUser, getAccount, getPrefs].map((fn) => call(fn))
```

#### Parameters


fn(...args: A) => Rrequired

the function to invoke.


argsArequired

the arguments passed to `fn`.

#### Returns

the value returned by `fn`.

```typescript
R
```
