Open anton-trunov opened 1 month ago
FunC supports those, but Tact's topological sorting of between module entries would prohibit mutual recursion.
The classical test case would be a mutually recursive implementation of the even and odd functions:
even
odd
fun even(n: Int): Bool { if (n == 0) { return true; } else { return odd(n - 1); } } fun odd(n: Int): Bool { if (n == 0) { return false; } else { return even(n - 1); } } contract Test { get fun even(n: Int): Bool { return even(n); } get fun odd(n: Int): Bool { return odd(n); } }
FunC supports those, but Tact's topological sorting of between module entries would prohibit mutual recursion.
The classical test case would be a mutually recursive implementation of the
even
andodd
functions: