Mutual recursion: Difference between revisions

(Add BQN)
Line 3,606:
 
which indicates that the functions call themselves (<code>'''rec'''</code>) and each other (<code>'''and'''</code>).
{{out}}
<pre>
> val terms = List.tabulate (10, fn x => x);
val terms = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]: int list
> map f terms;
val it = [1, 1, 2, 2, 3, 3, 4, 5, 5, 6]: int list
> map m terms;
val it = [0, 0, 1, 2, 2, 3, 4, 4, 5, 6]: int list
</pre>
 
=={{header|Swift}}==
Anonymous user