Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 11: Procedures with Procedures

David Evans
February 17, 2016

Class 11: Procedures with Procedures

cs1120: Introduction to Computing
Explorations in Language, Logic, and Machine
University of Virginia, Spring 2016

http://xplorecs.org/class11

Class 11:
Making Pairs without Lists
Higher-Order Functions

David Evans

February 17, 2016
Tweet

More Decks by David Evans

Other Decks in Programming

Transcript

  1. cs1120 Spring 2016 David Evans University of Virginia Class 11:

    Programming with Procedures Introduction to Computing: Explorations in Language, Logic, and Machines
  2. This Week in cs1120 Today: Higher-Order Procedures Practice Programming with

    Lists Friday: Crossroads School visiting (8th graders) Computing Machines Jason Mars talk (3:30 in Rice 130)
  3. Let’s Get Sirius Jason Mars Jason Mars (UVA CS PhD

    2012) is an Assistant Professor at the University of Michigan and CEO/Co-founder of Clinc. The talk will focus on Jason’s work building Sirius, an open-source replica of Apple’s Siri. Friday 19 February, 3:30pm in Rice 130 Computer Science Distinguished Alumni Speaker http://www.jasonmars.org
  4. Recap: Building Lists from Pairs A List is: 1) a

    Pair where the second part is a List, or 2) None
  5. Higher-Order Functions Functions that take functions as inputs Functions that

    return functions as outputs Main emphasis of Project 3
  6. Recap: Lists A List is: 1) a Pair where the

    second part is a List, or 2) None 1. Be very optimistic! 2. Determine the base case: usually the empty list (or singleton) 3. Recursive case: combine the result of doing something with the first element, with the recursive call on the rest of the list
  7. Charge • See Notes on web for lots more practice

    with list procedures (and today’s code) • Read Chapter 6 before Friday’s class • Get started on Project 3