Block expression

A block expression is almost like a block statement, but it is an expression that uses last expression under the block as the value. It is similar to the statement list expression, but the statement list expression does not open new block scope.

  1. let a = block:
  2. var fib = @[0, 1]
  3. for i in 0..10:
  4. fib.add fib[^1] + fib[^2]
  5. fib