Skip to content
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

Callback from T -> U #1

Open
onmyway133 opened this issue Dec 29, 2015 · 2 comments
Open

Callback from T -> U #1

onmyway133 opened this issue Dec 29, 2015 · 2 comments

Comments

@onmyway133
Copy link
Owner

Promise wants to hold an array of callbacks, each of which is a Callback with completion from T -> any arbitrary type U

The idea is to map from Promise<T> -> Promise<U> using then: T -> U
The problem is then acts as both subscribe and map

@onmyway133
Copy link
Owner Author

For now, Result<T> -> Result<U> does not hint the generic engine, so we must use as to use hint from the returned type Promise<U>

@onmyway133
Copy link
Owner Author

Use register block, basically, it is Result<T> -> Void, and returned promise do its notify inside this register block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant