# Thoughts

4 later thoughts

0

What is lexical scoping? A simple example in OCaml:

# let f x = x + 2;;
# let g x = f (f x);;
# let f x = x * x;;

# g 10;;
- : int = 14
# f 10;;
- : int = 100


8 earlier thoughts