Summary
In this chapter, we went inside R and learned how R functions basically work. More specifically, you learned lazy evaluation, copy-on-modify, lexical scoping, and how environments work to allow these mechanisms. Having a concrete understanding of how R code is run not only helps you write the correct code but also makes it easier to find bugs from unexpected results.
In the next chapter, we will build on top of the foundation laid in this chapter. You will learn the basics of metaprogramming, which enables powerful features of interactive analysis.