Skip to content

Parentheses in Decorators #97

@ghost

Description

1 function actuallyTransfer(from, to, amount) {
2 // do something
3 }
4
5 var invokeTransfer = once(maybe(actuallyTransfer(...)));

Should this perhaps be written as once(maybe(actuallyTransfer))(...)? To the best of my understanding, the decorators once and maybe should take in a function rather than a value.

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