Functional Problem Solving (CSC 151 2015F) : Outlines
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric] [Remote Access]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2015F)] [Davis (2013F)] [Rebelsky (2015S)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Held: Monday, 28 September 2015
Back to Outline 17 - Programming the GIMP Tools. On to Outline 19 - Pause for Breath.
Summary
We begin to explore Scheme's conditional control structures,
particularly if, when, and cond.
Related Pages
Overview
if.when.cond.Administrivia
What should I do if I got the following as sample output on problem 3?
> (seconds (add-times (time 0 0) (time 0 97)))
37
...
> (seconds (add-times (time 0 0) (time 0 97)))
97
Remember those? We did them early on in the semester.
How many of these do we know? Almost all of them.
if(if TEST CONSEQUENT ALTERNATE)when(when TEST CONSEQUENT_1 CONSEQUENT_2 ... CONSEQUENT_n)condForm
(cond
[TEST_1 CONSEQUENT CONSEQUENT ... CONSEQUENT]
[TEST_2 CONSEQUENT CONSEQUENT ... CONSEQUENT]
...
[TEST_n CONSEQUENT CONSEQUENT ... CONSEQUENT]
[else ALTERNATE_1 ALTERNATE_2 ALTERNATE_n])
Meaning
cond and if.when and cond.cond and if.