'with' param_list 'in' map_expr block_expr
Note that in contrast to most imperative languages like C/C++ or Java, a
with-construct is not a statement but an expression and, thus, yields a value.
with-expression is syntactic sugar for:
f(args, |param_list, break| -> ! block_expr)
f has type:
fn(A, fn(I) -> B) -> R
args must be of type
param_list of type
Additionally, Impala implicitly declares the following continuation which is usable inside
fn(B) -> !
This is the return-continuation of the call to
f. Thus, invoking this continuation returns from the current Function Expression with a value of type
block_expr also exits the current Function Expression, its type must be
The type of the whole
with expression is
R - whatever is yielded by invoking
with expression is just syntactic sugar, see Map Expression.