www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - improving '$' to work with other functions (eg: indexed)

can we support this and similar use cases ?

import std.range;
void main(){
  auto a=[1,2,3,4];
  auto b1=a.indexed([0,a.length-1]);//OK
  auto b2=a.indexed([0,$-1]);//NG
}
Oct 31 2013