Many of D rules are taken from C, we know that, so a general basic rule is to put ";" after each statement, so the previous statement of filter should be "auto r = chain(a, b).filter!(a => a > 0;);"? Why D leaves ";" in this case?
Breaking ";" rule with lambda functions
pascal111 via Digitalmars-d-learn Mon, 01 Aug 2022 07:21:43 -0700
We all know the strange syntax of lambda function within filter
algorithm like "auto r = chain(a, b).filter!(a => a > 0);". My
note is, don't we break D rules by leaving ";" after lambda
function syntax?!
- Breaking ";" rule with lambda ... pascal111 via Digitalmars-d-learn
- Re: Breaking ";" rule wit... ag0aep6g via Digitalmars-d-learn
- Re: Breaking ";" rule... pascal111 via Digitalmars-d-learn
- Re: Breaking ";" ... ag0aep6g via Digitalmars-d-learn
- Re: Breaking ";&qu... pascal111 via Digitalmars-d-learn
- Re: Breaking "... ag0aep6g via Digitalmars-d-learn
- Re: Breaking &... pascal111 via Digitalmars-d-learn
- Re: Breaki... ag0aep6g via Digitalmars-d-learn
- Re: Breaki... pascal111 via Digitalmars-d-learn
- Re: Breaki... ag0aep6g via Digitalmars-d-learn
- Re: Breaki... pascal111 via Digitalmars-d-learn