import std.math : cos;
real foo(T)(T fp, real x)
{
return fp(x);
}
void main()
{
real x = 0;
real y = foo(&cos, x);
}
jmh530 via Digitalmars-d-learn Tue, 07 Jul 2015 20:35:27 -0700
import std.math : cos;
real foo(T)(T fp, real x)
{
return fp(x);
}
void main()
{
real x = 0;
real y = foo(&cos, x);
}