RosettaCodeData/Task/Extend-your-language/Jq/extend-your-language-2.jq
2023-07-01 13:44:08 -04:00

8 lines
177 B
Text

def if2(c1; c2; both; first; second; neither):
c1 as $c1
| c2 as $c2
| if $c1 and $c2 then both
elif $c1 then first
elif $c2 then second
else neither
end;