2D (or higher) equivalent of ranges?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed May 16 13:42:40 PDT 2012

On Wed, May 16, 2012 at 10:32:24PM +0200, Philippe Sigaud wrote:
> On Wed, May 16, 2012 at 8:09 PM, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:
> > Lately I've been considering how to generalize multi-dimensional
> > arrays along the same lines as std.range.
> Maybe that could interest you:
> http://svn.dsource.org/projects/dranges/trunk/dranges/docs/rangeofranges.html
> (code is easier to see here:
> https://github.com/PhilippeSigaud/dranges/blob/master/rangeofranges.d
> )

Cool!! This is exactly what I have in mind. Thanks!!

> More exotic:
> http://svn.dsource.org/projects/dranges/trunk/dranges/docs/recursive.html

This is even better. Could this become the basis of generic tree
processing algorithms?

I also envisioned a similar generalization of ranges for graphs and
digraphs, although in that case the meaning of 'range' may be


"You know, maybe we don't *need* enemies." "Yeah, best friends are about all I can take." -- Calvin & Hobbes

More information about the Digitalmars-d mailing list