It would be fantastic if I could write this - static if(forward){ foreach(item; items) dostuff(); }else{ foreach_reverse(item; items) dostuff(); }
as something like this - foreach!forward(item; items) dostuff(); Is there any way to accomplish this?
pineapple via Digitalmars-d-learn Sat, 04 Jun 2016 07:36:48 -0700
It would be fantastic if I could write this - static if(forward){ foreach(item; items) dostuff(); }else{ foreach_reverse(item; items) dostuff(); }
as something like this - foreach!forward(item; items) dostuff(); Is there any way to accomplish this?