More uses of operator "in"

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 28 08:11:47 PDT 2014


On Tuesday, 28 October 2014 at 14:06:27 UTC, Steven Schveighoffer 
wrote:
> No. The implication of 'in' for AAs is that it is a fast, 
> O(lgn) or better, operation. Your assertion requires O(n) 
> performance.

What about making it work for (builtin) tuples? Then it could be 
make use of a variadic std.algorithm: find() or some lazily 
defined hash-table.

Maybe it could be part (if not already there) of Kenjis great 
tuple improvement PR which is awaiting review and merge.


More information about the Digitalmars-d-learn mailing list