RosettaCodeData/Task/Mutual-recursion/Jq/mutual-recursion-1.jq
2023-07-01 13:44:08 -04:00

6 lines
175 B
Text

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;