Need help with basic functional programming

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 22 11:04:30 PDT 2014


On Tuesday, 22 July 2014 at 17:09:29 UTC, bearophile wrote:
> Eric:
>
>>    while (!buf.empty())
>>    {
>>        p++;
>>        buf.popFront();
>
> Those () can be omitted, if you mind the noise (but you can 
> also keep them).

Actually, the ones behind `empty` and `front` are wrong, because 
these are defined to be properties. They just happen to work 
currently.


More information about the Digitalmars-d-learn mailing list