Recitation 4

  1. Compare and contrast OCaml lists with lists in another language; Python or Java would be a good choice. Concentrate your discussion on the syntax (if any) built-in to the language for lists, how to build lists, and how to access pieces of lists.

  2. Pattern matching is probably unlike any language features you’ve encountered before, unless you’ve learned other functional languages. Summarize your current understanding of what pattern matching is, why it is useful, and what you might be confused about regarding it at this time.

  3. Using the function keyword as an example, explain what syntactic sugar is. Demonstrate how that keyword can be used to improve a piece of code.

Submit your answers to CMS.