Functional Problem Solving (CSC 151 2014S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010S)] [Rebelsky (2013F)] [Weinman (2012F)] [Weinman (2014S)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
Overview
Can I assume that the values in the list for nearest are in ascending order?
No.
If I write a helper for nearest can I have more than two parameters for that
helper?
Yes. You'll probably need more than two.
Do I need to document my helpers?
A one-line piece of documentation will suffice. (You'll think about it better writing the six P's, but it's not necessary.)
How can I not die on the nearest procedure?
We've written similar procedures before. So look through the readings and identify an appropriate pattern.
nearestis looking for the "best" of a set of values.drawings-leftmostandirgb-brightestdo the same.
Can I ask Kim the mentor for help on the exam?
Given that last response, it seems risky. But no, you may not ask Kim for direct help. You can, however, ask her to explain things from past readings and lab. "Kim, I don't understand
drawings-leftmost. Can you explain how it works?" You also can't ask Kim your colleague.
Let's run through an example by hand?
(nearest 29 (list 19 4 64 1 32 11))
value best-so-far remaining
29 19 '(4 64 1 32 11)
29 19 '(64 1 32 11)
29 19 '(1 32 11)
29 19 '(32 11)
29 32 '(11)
29 32 '()
What's a unit of text?
A function name, parameter, value, or keyword.
On problem 3, when we're flattening without conditionals, can we use procedures that you didn't give in the hint?
Yes. You'll probably need +, -, *, or /.
Can you give me another hint on question 3?
Sure: 0 = 064, 64 = 164, 128 = 264, 192 = 364 and 256 = 4*64.
So think about turning ranges into the multipliers.
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010S)] [Rebelsky (2013F)] [Weinman (2012F)] [Weinman (2014S)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
Samuel A. Rebelsky, rebelsky@grinnell.edu
Copyright (c) 2007-2014 Janet Davis, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials are copyright by John David Stone or Henry Walker and are used with permission.)

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by-nc/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.