Right now (as of issue creation time) anonymous functions can only be declared like this:
Which gets pretty annoying when it comes to using functions like map:
map((x) -> return num(x), input().split())
The suggestion is that another operator should be added, which will allow creation of one-expression instant-return lambdas:
map((x) => num(x), input().split())
Suggestions for operator symbol:
=>
->:
- other suggestions could be added in comments below
This operator should be a syntaxic sugar and at parse-time should unfold into regular lambda.
Right now (as of issue creation time) anonymous functions can only be declared like this:
Which gets pretty annoying when it comes to using functions like
map:The suggestion is that another operator should be added, which will allow creation of one-expression instant-return lambdas:
Suggestions for operator symbol:
=>->:This operator should be a syntaxic sugar and at parse-time should unfold into regular lambda.