Two-dimensional slices in D
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 14 10:27:15 PDT 2015
On 04/14/2015 07:21 AM, Dennis Ritchie wrote:
> F#:
> -----
> printfn "%A" xs.[4 .. 7, 4 .. 9]
> -----
D supports that syntax as well:
http://dlang.org/operatoroverloading.html#slice
I have a simple example here:
http://ddili.org/ders/d.en/templates_more.html#ix_templates_more.multi-dimensional%20operator%20overloading
Ali
More information about the Digitalmars-d-learn
mailing list