RosettaCodeData/Task/Mutual-recursion/Jq/mutual-recursion-1.jq

7 lines
175 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
def M:
def F: if . == 0 then 1 else . - ((. - 1) | F | M) end;
if . == 0 then 0 else . - ((. - 1) | M | F) end;
def F:
if . == 0 then 1 else . - ((. - 1) | F | M) end;