RosettaCodeData/Task/Arithmetic-evaluation/Jq/arithmetic-evaluation-1.jq

6 lines
157 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
def star(E): (E | star(E)) // .;
def plus(E): E | (plus(E) // . );
def optional(E): E // .;
def amp(E): . as $in | E | $in;
def neg(E): select( [E] == [] );