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

typo #29

Closed
wants to merge 1 commit into from
Closed

typo #29

wants to merge 1 commit into from

Conversation

musm
Copy link
Contributor

@musm musm commented Sep 19, 2019

A couple of comments on the documentation.

Could we get some documentation or clarification for what self actually refers to or does? To me it's not that clear.

Also using @dynamo with dispatch kinda seems a bit magical at this point to me. It would be good if there were some further explanation/examples of how it works?

Otherwise thanks for this package.

@MikeInnes
Copy link
Member

This is meant to be we ... let dispatch ..., in which case it would be correct (but I see why you might have read it differently).

self just refers to the function/dynamo you're currently working with. After you've returned it, it gets replaced with %1 or whatever argument represents that function.

A @dynamo is nothing but a normal method (the same as a generated function as well). If you call foo(f, x), dispatch decides whether you hit the dynamo method or a different method that runs normal code.

Does that clear things up? Happy to keep discussing and we can hopefully work out how the docs can be clearer.

@musm
Copy link
Contributor Author

musm commented Sep 19, 2019

Ah sorry for the noise, you are right.

Thank you for the clarification. I would appreciate it if self was described in the docs, which would help other readers.

@musm musm closed this Sep 19, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants