The first line:
has the result, that `recEnv` is a mutable map, which contains all elements from `env`. This is important, so that mutating `recEnv` does not change env.
The second line is a bit tricky, because it uses and modifies the same map in a single statement, so here evaluation order is very important.
let me make the evaluation order a bit more explicit, this will behave exactly as the line before:
Code: Alles auswählen
val recursiveBoundValue = interp(namedExpr, recEnv)
recEnv += boundId -> recursiveBoundValue
what you can see here, is that we evaluate the `namedExpr` in the `recEnv`.
Because this is a recursive definition, `namedExpr` may contain references to the `boundId`, but `boundId` is not yet in the `recEnv`, because we only know the `recursiveBoundValue` after the evaluation.
So we evaluate `namedExpr` in the `recEnv` and require that the `boundId` is not immediately used (which would result in infinite recursion anyways), but only used guarded inside a closure.
Afterwards we fix `recEnv` by putting the correct value at `boundId`. And because this is a mutable map, this change will also be visible everywhere `recEnv` was used (captured by a closure) inside of `namedExpr`.