RosettaCodeData/Task/Mutual-recursion/Jq/mutual-recursion-1.jq
2017-09-25 22:28:19 +02: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;