CMPU10154 Computer Science I and Lab. (Spring 2019)
Calendar
This calendar will evolve over the course of the semester. Typical entries will include links to the code we have studied in class, details of lab. problems and assignments, and sections of the textbook we covered in class.
Wk.  Tuesday 
Thursday 
Friday 
I 
Welcome and Introduction. 
 
II 



III 
Nonempty lists and how they store data. Scheme's computational model, the Default Rule ('evaluate and apply'). A close look at the eval function. The quote function.
Chapter 7.2. 
Review of the Default Rule and the eval and quote functions. Predicates: type checking (e.g. number? and null? )
and comparisons (e.g. < and >= ). The eq? function.

Beginning conditionals with if . Nesting if expressions for more complicated reasoning.

IV 
Beginning recursion: solving problems by applying a function to its own output, such as evenly dividing a double chocolate cake. (Yum.) The factorial function. 
Review of recursion. Introduction to more complex conditions with cond .


V 
Adventures in logic: more complex conditional expressions with boolean operators. Introducing and , or and not .

Continuing with booleans. Removing if or cond from predicates. Simplifying expressions.


VI 
first and rest . Stitching
lists together with cons . Revisiting null? .

<= and = ) as inputs to a function.


VII 
More on list recursion. Concatenating lists. Merging lists. Merging lists with different numbers of elements. 
MIDTERM REVIEW. Please bring questions & subjects to review. 
INCLASS MIDTERMCovers all material explored to date. 
Saturday, 9th to Sunday, 24th MarchSPRING BREAKHappy holidays! :) 

VIII 
Individual Reviews. 
Return to recursion. Tail recursion. Using accumulators to store partial results of computations. 

IX 
Functions as inputs to another function. Calling one function we have written from another function we have written. Wrapper functions. 
Review of list recursion, wrapper functions and accumulators. Mapping functions. Calling functions from other functions. 

X 
Local environments and local variables using let . Random numbers and how to store them.

Local environments continued. Sequential evaluation of local variables with let* . Using letrec to
write local recursive functions.


XI 
A conditional with only a true case: when . Beginning destructive programming: changing values of variables with set! . Iteration using while and dotimes

Changing recursive functions to iterationbased functions. 

XII 

Review of Assignment 9: considering nested loops and changing values with set! . Using vectors to speed up programs.

Storing information tidily using data structures. makestruct and other associated functions.

XIII 


INCLASS FINALFocuses on material since midterm,but covers all material. 
XIV 
Last class :'( 