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

Multiple decorators order #49

Open
antonmi opened this issue Jun 9, 2021 · 0 comments
Open

Multiple decorators order #49

antonmi opened this issue Jun 9, 2021 · 0 comments

Comments

@antonmi
Copy link

antonmi commented Jun 9, 2021

Hey guys!
Thank you for the great tool!
I'm experimenting a bit with multiple decorators like:

@decorate foo()
@decorate bar()
@decorate baz()
def hello() do
  :world
end

Intuitively I expect baz to decorate hello, then bar decorates baz and hello, then, finally foo decorates all of them bar, baz, hello.

But for some reason, there is Enum.reverse here

|> Enum.reverse()

so the execution is the opposite: baz decorates bar, foo, hello.

What is the intention of reversing the order?
And do you recommend applying several decorators?
Thank you!

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