We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5365b64 commit a018ff2Copy full SHA for a018ff2
source/mir/ndslice/topology.d
@@ -2396,6 +2396,19 @@ template map(fun...)
2396
{
2397
return slice;
2398
}
2399
+
2400
+ /// ditto
2401
+ auto map(T)(T[] array)
2402
+ {
2403
+ return array.sliced;
2404
+ }
2405
2406
2407
+ auto map(T)(T withAsSlice)
2408
+ if (hasAsSlice!T)
2409
2410
+ return withAsSlice.asSlice;
2411
2412
2413
else alias map = .map!(naryFun!fun);
2414
0 commit comments