recursion

Allows to call recursively the function being executed.

recursion
(
string Fun = __FUNCTION__
A...
)
(
auto ref A a
)

Parameters

a A

the parameters expected by the function.

Return Value

Type: auto

The same as the function being executed.

Examples

long factorial(long a)
{
	 if (a <= 1)
		 return a;
	  else
		  return a * recursion(a-1);
}

Meta