Re: Pass lambda into template

2018-09-03 Thread vit via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to

Re: Pass lambda into template

2018-09-03 Thread Paul Backus via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to

Re: Pass lambda into template

2018-09-03 Thread Andrea Fontana via Digitalmars-d-learn
On Monday, 3 September 2018 at 09:09:44 UTC, Andrey wrote: Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to

Pass lambda into template

2018-09-03 Thread Andrey via Digitalmars-d-learn
Hello, Here is a code with comments: https://run.dlang.io/is/BNl2Up. I don't understand how to pass lambda into template. I get an error: onlineapp.d(18): Error: template instance `qwerty!((i) => "arg" ~ i.to!string ~ "[0] == '?'", "||")` cannot use local __la