How to specify which parameters a function that is received as an argument should receive?

Marcone marcone at email.com
Tue Oct 13 09:02:04 UTC 2020


How to specify which parameters a function that is received as an 
argument should receive?

Example:

import std;

void myfun(int n){
     writeln(n);
}


void test(lazy void delegate() fun) // how specify that "fun" may 
receive int ?
{
     fun(int);
}

test({myfun;});


More information about the Digitalmars-d-learn mailing list