NotNull pointers

bearophile bearophileHUGS at lycos.com
Wed Aug 31 09:57:01 PDT 2011


Simen Kjaeraas:

> Next iteration:
> 
>      [x; 2 * x; iota(10); x & 1]

If you don't like the syntax I've shown with foreach, then use the Python syntax, it's readable and short and good:

[2 * x for x in iota(10) if x & 1]
Or:
[2 * x for x in 0 .. 10 if x & 1]

Bye,
bearophile


More information about the Digitalmars-d mailing list