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
Async.map #859
Comments
The rejected uservoice shouldn't be a problem since it also contained |
Duplicate of #36 |
Funnily enough there's no async module but a class with static members: https://github.com/dotnet/fsharp/blob/master/src/fsharp/FSharp.Core/async.fs#L1091 So this could be Alternatively, a new module could be added similar to what we do in the F# tools for VS: https://github.com/dotnet/fsharp/blob/master/vsintegration/src/FSharp.Editor/Common/Pervasive.fs#L176 With |
Not a duplicate. That one is asking for the ability to define maps in computation expression builders, which can be used to simplify the translations of some expressions. This one is asking for map to be exposed in the Async module. Same function but the uses are pretty much disjoint. |
@cartermp thanks for explaining the module versus type.
I'd be in favour of a module if that seems like a viable option. |
Echoing @Happypig375 I'd be happy if this was just on the builder, we use some other functions directly from the builder in our codebases. Given it will probably be there eventually for #36 maybe we could just add it early? |
With the upcoming applicative CE feature,
The question is, would it be possible to make it effectively more optimal than the bind based version? |
Add Async.map in the Async Module
I propose we add a map function to the Async module.
The main reason is that it is so trivial to have and it would provide parity with other modules (List, Result, ...)
The existing way of approaching this problem in F# is writing the function yourself:
Pros and Cons
The advantages of making this adjustment to F# are:
The disadvantages of making this adjustment to F# are ...
Extra information
Estimated cost (XS, S, M, L, XL, XXL): XS
Related suggestions:
Not sure why exactly this was rejected, I can't trace the replies back anymore.
Yes, this was rejected in the past, years later I wish to revisit this discussion. Purely for the
map
function that it.Affidavit (please submit!)
Please tick this by placing a cross in the box:
Please tick all that apply:
The text was updated successfully, but these errors were encountered: