-
Notifications
You must be signed in to change notification settings - Fork 148
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
Rename IPromise.Transform to IPromise.Then #4
Comments
I wish that were possible. I haven't found a way to have Transform be Then and still compile. If you can find a way to do this please fork the repo, make the change and submit a pull request. I'd be very keen to have it work the way you suggest. |
Hi @ashleydavis, I think #1 made possible refactoring
public IPromise<ConvertedT> Then<ConvertedT>(Func<PromisedT, ConvertedT> f)
{
//Argument.NotNull(() => transform);
return Then((PromisedT t) => (IPromise<ConvertedT>)new Promise<ConvertedT>(f(t)));
} I have experience with Futures/Promises since I made my own Futures library for the project, as far as I saw it worked perfectly but I decided to use your library once #1 was solved. |
I'll be really happy if you can get Transform changed to Then ;) Please submit a PR when you are ready to get your change in. |
Its not ambiguous and you only have to remember 1 method. I use Dart which has a standard Futures library and I find it a lot easier.
The text was updated successfully, but these errors were encountered: