Today we learned about the benefits of pattern matching over conditionals for the purpose of inspecting data. We learned about the parse, don't validate paradigm of deconstructing data based on its form, not based on validating the data with otherwise informationless predicates.
We also introduced structural induction on lists, which is a form of induction similar to that over the natural numbers, except extended so that it can be used on SML lists. It behaves similarly, except that instead of inducting over numbers, it is inducting over all the kinds of lists that can be formed by the simple recursive definition of a list.
We then learned about the concept of tail recursion, which is when a function makes only one recursive call to itself. This can help in the efficiency and runtime of some functions, and we wrote some examples of tail-recursive functions, as well as seeing why a non tail-recursive implementation of the length function would otherwise take up a large amount of memory.