confused with data types
thorstein
torsten.lange at mail.de
Sat Feb 17 16:12:48 UTC 2018
Hello,
This was my goal:
-----------------
public double[][] skalar_m_2d(double[][] array, double skalar)
{
return array.map!(b => b[].map!(c => c * skalar));
}
!!! But: return value is not double!
Type check for return value:
----------------------------
a = array.map!(b => b[].map!(c => c * skalar))
writeln(typeof(a).stringof); //-> MapResult!("__lambda4,
double[][])
a = array.map!(b => b[].map!(c => c * skalar))[1];
writeln(typeof(a).stringof); //-> MapResult!("__lambda2, double[])
How can I get the result as double[][] ???
Thanks, thorstein
More information about the Digitalmars-d-learn
mailing list