Lambda syntax, etc

bearophile bearophileHUGS at lycos.com
Mon Feb 9 06:47:52 PST 2009


bearophile:
> auto r1 = range.find((ArrayType1!(typeof(range)) x) { return x.weight > 100; });

Better:
auto r1 = range.find((BaseType1!(typeof(range)) x) { return x.weight > 100; });

Of course, you have to specify range twice there, and that's not good.

Bye,
bearophile



More information about the Digitalmars-d mailing list