Breaking ";" rule with lambda functions
pascal111
judas.the.messiah.111 at gmail.com
Mon Aug 1 15:31:51 UTC 2022
On Monday, 1 August 2022 at 15:08:04 UTC, ag0aep6g wrote:
> On Monday, 1 August 2022 at 14:52:03 UTC, pascal111 wrote:
>> If `foo => bar` == `(foo) { return bar; }`, then `foo => bar`
>> is a function. "=>" is not an operator, it's a special symbol
>> for lambda "function".
>>
>> If A == B, so A's types is the same of B's type. How can it be
>> withstanding `foo => bar` == `foo => bar` == `(foo) { return
>> bar; }` and `foo => bar` is an expression and the other is a
>> function?!! no sense.
>
> `foo => bar` and `(foo) { return bar; }` are both function
> literals, and they're both expressions. The concepts are not
> mutually exclusive.
Surely, because it seems that you are real man, your word must be
taken. Isn't `(foo) { return bar; }` an anonymous function or am
I a wrong?!! It IS a function, not an expression.
More information about the Digitalmars-d-learn
mailing list