Finished more code for the lecture on higher-order functions.