-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alias of 'result' #325
Comments
You could add your own operator in your own code by noting that the result operator is simply: FSharpPlus/src/FSharpPlus/Operators.fs Lines 104 to 105 in 3fdc133
|
Yep, I have, I just figured that it'd be nice to have in FSharpPlus too, since both FSharpPlus and FsToolkit.ErrorHandling are very useful libraries that work nicely together. |
Just to add more information, I think we could add a unary operator but not sure which. |
But that doesn't work well with piping, right? E.g. instead of a |> b |> c |> result you would have to write <op>(a |> b |> c) right? In any case, I get the point about abbreviations, though I think it can work if the abbreviation is clear and if it is for a good reason (e.g. to avoid a reserved keyword). |
I would rather say:
Any suggestions for either operator or abbreviation? |
I use both FSharpPlus and FsToolkit.ErrorHandling in all my projects. The latter defines a
result
builder, which conflicts with theresult
operator from FSharpPlus. AFAIK there are other standard names for theresult
operator (not entirely sure –pure
?retn
?). I suggest FSharpPlus adds one or more of these standard aliases forresult
.The text was updated successfully, but these errors were encountered: