In the following from Programming in D, page 483, we use function keyword.

I expect that the first int in
```
int function(int);
```

represents the return value.

What does the second (int) refer to?

Then there is another example with 'delegate' instead of 'function.

```
import std.stdio;

void main()
{

}

alias Calculator = int function(int);

Calculator makeCalculator()
{
        int increment = 10;
        return value => increment + value; // ← compilation ERROR
}

```

Reply via email to