Super-dee-duper D features
kris
foo at bar.com
Tue Feb 13 19:26:32 PST 2007
Bill Baxter wrote:
[snip]
> I must not understand what your InterleavedIterator does then. I'm
> thinking of something like:
> char[][] names = ["chuck", "barney", "bart"];
> int[] ids = [12983, 32345, 39284];
>
> foreach (x; InterleavedIterator(names,ids)) {
> writefln("Name=%s id=%s", x[0], x[1]);
> }
The one in Tango operates with a common type only; where perhaps you're
combining the content of more than one collection (in Tango, you can
populate a collection via an iterator, for example).
Combining mutliple lists of differing type is a somewhat different
animal; if the lists are of differing lengths also, one might imagine
all kinds of non-deterministic behaviour :)
More information about the Digitalmars-d
mailing list