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
Talk about the Moby Dick image.
Do you need to see tests for the turtle draw text thingy?
No. I can read code.
Can you give us a hint about problem 9?
(define husk
(lambda (params)
(cond
[(fails-precondition-1 params)
(error "Boy, that was bad input")]
[(fails-precondition-2 params)
(error "No, it shouldn't do that either)]
[else
(let kernel ([a 1]
[b 2])
...)])))
or
(define husk
(lambda (parms)
(let ([kernel (lambda (a b) ...)])
(cond
[(fails-precondition-1 params)
(error "Boy, that was bad input")]
[(fails-precondition-2 params)
(error "No, it shouldn't do that either)]
[else
(kernel 1 2)]))))
Do we need a helper for problem 6?
You should not need a helper for probem 6.
For problem 3, can we use a recursive helper?
Not if you want to receive credit for the problem.
You will need to use
maporrepeatorfor-each.
What is the goal in problem 3?
See the whiteboard
Can I do extra work and prevent a swap in problem 3 from using the same location?
Sure. But it will be harder.
What's the difference between problem 2 and problem 3?
Problem 2 swaps one pair of elements with specified indices.
Problem 3 swaps n pairs of elements with random indices. It probably uses your solution to problem 2.
What should I do if I can't solve problem 2?
Write problem 3 pretending that you correctly solved problem 3. But you won't be able to test.
Should we document tree-balanced? in problem 6?
Yes. The rule is "document unless told otherwise".
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.