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

Sugar around async consumption #12

Open
arichiardi opened this issue Nov 6, 2018 · 0 comments
Open

Sugar around async consumption #12

arichiardi opened this issue Nov 6, 2018 · 0 comments

Comments

@arichiardi
Copy link
Contributor

Hello folks!

Today we had a very interesting conversation about consumption from the AsyncContext and the fact that the library could implement a bit more in the protocol and handle quite a bit of boilerplate that always happens to be necessary.

For instance one very common thing that could be abstracted is:

(-> (fn-returning-a-promise)
  (.then #(assoc :result %))

Could be hidden behind the protocol and have something like:

(-> (fn-returning-a-promise)
  (assoc :result))

What do you think?

It would be nice to experiment with this.

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