Skip to content

Multiple decorators order #49

@antonmi

Description

@antonmi

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions