Absolutely a newbie to D. This code mimics c, but unfortunately
does not work:
import std.typecons;
import std.math;
alias double function(double) UNARY;
UNARY[] FCNS = [sin, cos, tan];
double[][] MAP (int idx, double[][] args) nothrow {
UNARY f = FCNS[idx];
foreach(i; 0 .. args.le
On Saturday, 16 February 2019 at 05:06:55 UTC, mnar53 wrote:
Absolutely a newbie to D. This code mimics c, but unfortunately
does not work:
import std.typecons;
import std.math;
alias double function(double) UNARY;
UNARY[] FCNS = [sin, cos, tan];
double[][] MAP (int idx, double[][] args)
On Saturday, 16 February 2019 at 06:29:28 UTC, Alex wrote:
On Saturday, 16 February 2019 at 05:06:55 UTC, mnar53 wrote:
[...]
I assume, this would do its job:
ยดยดยด
import std.typecons;
import std.math;
[...]
Yes, it works. Thx.