The code in the diagram uses the Scheme if construct in the definition of smaller-items and larger-items. Although it's intuitive I don't recall it being introduced in text prior to this point.