thanks a lot both! Yes I'm aware that map exists already. This
was didactic. I had tried to find out whether lambdas generate
function pointers but also couldn't figure that one out :D
On Monday, 21 February 2022 at 10:04:16 UTC, steve wrote:
I am trying to implement a simple map function. I found code to
do this in another post but it only seems to work with lambda
functions and I do not understand why. Any help would be
greatly appreciated
```
import std.stdio;
T[] map_v
On Monday, 21 February 2022 at 10:04:16 UTC, steve wrote:
I am trying to implement a simple map function. I found code to
do this in another post but it only seems to work with lambda
functions and I do not understand why. Any help would be
greatly appreciated
```
import std.stdio;
T[] map_v
I am trying to implement a simple map function. I found code to
do this in another post but it only seems to work with lambda
functions and I do not understand why. Any help would be greatly
appreciated
```
import std.stdio;
T[] map_vals(T,S)(scope T function(S) f, S[] a){
auto b = new T[