Change function(...) to use 1-argument form.
Remove beam files from chapter 2; fix example 1.