dotnet / dotNext

Next generation API for .NET
https://dotnet.github.io/dotNext/
MIT License
1.62k stars 121 forks source link

Bind Method For Result<T> To Chain Values like in f# #154

Closed furesoft closed 1 year ago

furesoft commented 1 year ago

It would be really usefull to have a bind method to make more readable code.

sakno commented 1 year ago

The method you requested exists already, which is called Convert. I could use different name such as bind (F#) or map/flatMap (Java) but Convert reflects its natural meaning in the context of imperative language: converts the value of type A to the value of type B.