Casting MapResult

wobbles via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 15 08:25:07 PDT 2015


On Monday, 15 June 2015 at 15:10:24 UTC, jmh530 wrote:
> <snip>
> float[] exp(float[] x) {
> 	auto y = x.map!(a => exp(a));
> 	cast(float[]) y;
> 	return y;
> }
>


Also, I dont think your functions will work?
Your recursively calling "exp" in your map, but with a 'float' 
instead of 'float[]'.


More information about the Digitalmars-d-learn mailing list