Functional Problem Solving (CSC 151 2015S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric] - [Calendar]
Current: [Assignment] [EBoard am] [EBoard pm] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards am] [EBoards pm] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2014F)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Book Office Hours] - [Issue Tracker (Course)]
Overview
I did not take time last week to condemn the postings on Yik Yak because I thought the president's statement sufficed. But it sounds like individual voices are necessary, too. And, as a technologist, I have particular responsibility to comment in this case. So I should have done so more promptly. I apologize for the delay, particularly because this issue is very important to me.
Let me make it absolutely clear. Use of any medium - social, physical, virtual - to denigrate other people for their characteristics is completely unacceptable. I have updated our course front door to clarify this perspective. (If you have comments on how to better phrase my policy, I would appreciate them.)
How should we ask whether a list has one element?
(null? (cdr lst))Or
(and (not (null? lst)) (null? (cdr lst)))Do not use
(= 1 (length lst))!
When will we get the quizzes back?
Wednesday, I hope. Otherwise Monday.
One of our mentors wants you to solve the last extra problem because he/she/zi could not.
Terminology: The typical model has "this is what you do most of the time" and "this is what you do when the input is really simple" (e.g., singleton list or empty list). These are the recursive case and base case, respectively.
You'll find that recursion is one of those cases in which the computer is more dense than normal. "Add 1" (to what?) "Add 0" (to what?)