'in' syntax for searching arrays

Janice Caron caron800 at googlemail.com
Sun Nov 4 00:26:03 PDT 2007


On 11/4/07, Janice Caron <caron800 at googlemail.com> wrote:
> My third thought is a function findEach() which returns a class which
> overloads foreach, so you could do
>
> V[K] a;
> foreach (key; a.findEach(value)) {}

Ooh - on fourth thoughts, I'd like to rename that function "each". As in

    foreach (key; a.each(value)) { /*do something*/ }

I like that.



More information about the Digitalmars-d mailing list