dotnet / dotnet/fsharp

BindNReturn documentation error

Open
#19,316 0 comments 0 reactions 0 assignees View on GitHub
Area-Documentation Bug
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

The [documentation](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions) for BindNReturn gives this as its signature:

```
(M<'T1> * M<'T2> * ... * M<'TN> * ('T1 * 'T2 ... * 'TN -> M<'U>)) -> M<'U>
```

In fact, I believe the signature should be:

```
(M<'T1> * M<'T2> * ... * M<'TN> * ('T1 * 'T2 ... * 'TN -> 'U)) -> M<'U>
```

That is, the supplied function returns a pure `'U`. The examples given in the [sample ApplicativeBuilder](https://github.com/fsharp/fslang-design/blob/main/FSharp-5.0/FS-1063-support-letbang-andbang-for-applicative-functors.md) also agree that the supplied function returns pure values.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.