Content deleted Content added
Undid revision 941753297 by 90.230.194.205 (talk): ? I don't see anything C++ specific in the code example. |
|||
Line 27:
====Basic examples====
A standard example of mutual recursion, which is admittedly artificial, determines whether a non-negative number is even or odd by defining two separate functions that call each other, decrementing each time.{{sfn|Hutton|2007|loc=6.5 Mutual recursion, pp. [https://books.google.com/books?id=olp7lAtpRX0C&pg=PA53&dq=%22mutual+recursion%22 53–55]}} In C
<source lang=C>
bool is_even(unsigned int n) {
|