Go backward to Scoping Rules Go up to Top Go forward to Example |
E[[LAMBDA (I) E]] =
lambda e. inFunction(
lambda e'.lambda d. E[[E]](updateenv [[I]] d e'))
E[[E1 E2]] =
lambda e. let x = (E[[E1]]e) in
cases x of
isFunction(f) -> (f e (E[[E2]]e))
[] otherwise -> inError()
end
Statically scoped languages are difficult to understand.