Skip to content

Syntactic sugar for distinguishing value from closure arguments #513

@nicowilliams

Description

@nicowilliams
def f($a_value, a_closure, $another_value, another_closure):
    ...;

should be equivalent to:

def coerce(closure):
    [first(closure)] | if length == 0 then error("empty value argument") else .[0] end;
def f(a_val, a_closure, b_val, another_closure):
    coerce(a_val) as $a_value |
    coerce(b_val) as $another_value |
    ...;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions