Learning Module 1 — Recursion

Why this is important: Recursion is a foundational principle in both mathematics and computer science. It is the second most powerful concept in computer science. In our course, we will use recursive structures to define and implement languages. Further, there is a style of recursion called tail recursion that a modern compiler can optimize to be a loop in machine code.

Outcomes

  • 1.1 – Write a recursive function over integers (2 points)
  • 1.2 – Write a mapping recursion over lists (2 points)
  • 1.3 – Write a folding recursion over lists (2 points)
  • 1.4 – Write a tail recursive function (2 points)
  • 1.5 – Indicate the advantage of tail recursion over direct style (MC) (2 points)
Next