I'm trying the following mutual recursion example in Dyalog APL Win10:
even ← { (odd ⍵-1) ∨ ⍵=0 }
odd ← { (even ⍵-1) ∧ ⍵>0 }
even 7
WS FULL
It looks like the ∨
and ∧
doesn't stop evaluation at reaching a defined state.
The WS FULL shows that the recursion actually works but doesn't terminate properly.
How to make mutual recursion in APL?
PS.
I'm very new to APL and doesn't know the proper syntax of ∇
functions. Anyway, I prefer a more "functional" style, if it is possible.