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

7 lines
175 B
Plaintext

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;