rosetta/mutual_recursion.bruijn

Problem description

:import std/Combinator .
:import std/Number .
:import std/List .

f' [[[=?0 (+1) (0 - (1 (2 --0)))]]]

m' [[[=?0 (+0) (0 - (2 (1 --0)))]]]

f ^(y* (f' : {}m'))

m _(y* (f' : {}m'))

:test ((f (+0)) =? (+1)) ([[1]])
:test ((m (+0)) =? (+0)) ([[1]])
:test ((f (+4)) =? (+3)) ([[1]])
:test ((m (+4)) =? (+2)) ([[1]])
:test ((f (+15)) =? (+9)) ([[1]])
:test ((m (+15)) =? (+9)) ([[1]])

main [[0]]