Closed
Description
Hi,
Loving the language!
The docs on statement lambdas say that
statement can be an assignment statement or a keyword statement
and
Statement lambdas support full statements rather than just expressions and allow for the use of pattern-matching function definition
But I might be misunderstanding what that means exactly, since I'm getting syntax errors on any statement lambda that contains what Python's grammar defines as a compound statement, namely
compound_stmt:
| function_def
| if_stmt
| class_def
| with_stmt
| for_stmt
| try_stmt
| while_stmt
| match_stmt
So per docs something like this should work, but doesn't
def () => if True: pass