# arity

```erlang
arity :: (Number length, Function fn) => Function fn
```

## description

Returns a new function whose arity will be the first argument you provide to `arity` and which will return the same result as the provided function. A good use case is when you want to limit how many arguments will passed to your function, if you do not control the context in which it is called.

## example

```javascript
import { arity } from 'conductor'

const words = ['hello', 'world']

words.forEach(console.log)
// 'hello' 0 ['hello', 'world']
// 'world' 1 ['hello', 'world']

words.forEach(arity(1, console.log))
// 'hello'
// 'world'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://conductor.js.org/1.3.0/api-reference/arity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
