Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pages/docs/manual/latest/function.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,27 @@ add(1, 2);

</CodeTab>

If you need to call a curried function with a single unit `()` argument, you can use the `ignore()` function:

<CodeTab labels={["ReScript", "JS Output"]}>

```res example
let echo = (. a) => a

echo(. ignore())
```

```js
function echo(a) {
return a;
}

echo(undefined);
```

</CodeTab>


If you write down the uncurried function's type, you'll add a dot there as well.

**Note**: both the declaration site and the call site need to have the uncurry annotation. That's part of the guarantee/requirement.
Expand Down