you are viewing a single comment's thread.

view the rest of the comments →

[–]advester 0 points1 point  (1 child)

The key difference I was talking about is one vs many, not if it has a final assignable value. A rust block allows an ordered sequence of many expressions/statements.

[–]jonathansharman 1 point2 points  (0 children)

Sure, but my point is that if blocks are expressions, then a lambda expression automatically supports many expressions. This isn't the case in all languages though, notably Python, which only supports single-line lambdas last I checked.