DCD 0.7.0
Chris via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Sep 3 04:41:37 PDT 2015
How about range snippets? I've just added a simple standard range
to my snippets.lua file:
range = [[private
{
R r;
}
this(R r)
{
this.r = r;
}
@property bool empty()
{
return r.length == 0;
}
@property auto front()
{
return r[0];
}
@property void popFront()
{
r = r[1..$];
}
Of course there can be all the different kinds of ranges (rangei
= infinite, rangef = forward range etc.).
More information about the Digitalmars-d-announce
mailing list