Breaking ";" rule with lambda functions
    pascal111 
    judas.the.messiah.111 at gmail.com
       
    Mon Aug  1 14:39:17 UTC 2022
    
    
  
On Monday, 1 August 2022 at 14:34:45 UTC, ag0aep6g wrote:
> On Monday, 1 August 2022 at 14:15:31 UTC, pascal111 wrote:
>> 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?
>
> `a => a > 0` is not a statement. It's an expression.
But it is still a "function", and functions make statements!! 
It's not a normal expression.
    
    
More information about the Digitalmars-d-learn
mailing list