Forward referencing functions in D

NonNull non-null at use.startmail.com
Sat Oct 17 15:28:03 UTC 2020


On Friday, 16 October 2020 at 21:28:18 UTC, Steven Schveighoffer 
wrote:
> Inner functions have benefits:
>
> 1. They are only accessible inside the function. Which means 
> you only have to worry about correctness while INSIDE that 
> function.
> 2. inner functions have access to the outer function's stack 
> frame.
>
> Often, I use inner functions to factor out a common piece of 
> code that I don't want to have to write multiple times in the 
> same function.
>
> -Steve

How can you write two inner functions that call each other? 
(Recursively)


More information about the Digitalmars-d-learn mailing list