Warning! You are being recorded and transcribed, provided the technology is working correctly.
Approximate optimistic overview
Scholarly
Artistic
Multicultural
Peer
Musical, theatric, sporting, and academic events involving this section’s students are welcome.
Wellness
Misc
These do not earn tokens, but are worth your consideration.
let
and let*
)Gradescope is confusing. How do I know what work is coming up?
I’d suggest the “upcoming work” section of the daily eboard.
If you have other suggestions of ways I can help you know what work is coming up, please let me know.
Can you send grade report emails more frequently?
I can try.
Did anyone attempt to fool Sam yesterday?
I don’t think so.
What does AFK mean?
Away from keyboard. If I tell you that I’m AFK, it means I’m probably answering a Teams Message or an email from my phone.
Can I earn tokens retrospectively?
Yes. We only look at your end-of-semester total.
Can I submit my MP6 post-reflection late without penalty?
Yes.
Does it matter whether I complete an LA as a quiz or on a SoLA?
No. The important issue is that you complete the LA. You can tell from your grade report which ones you’ve completed.
Two of the LAs can only be completed on paper (tracing and diagramming structures).
I’m not exactly seeing the benefits of viewing pairs.
We study pairs so that we have a better understanding of how Scheme functions (and why we get some of the outputs we do). Understanding pairs also permits us to build more complex structures.
Just like there are some procedures that only work with lists, are there any procedures that work only with nested pairs?
Most of the procedures that work with nested pairs also work with lists. I suppose we could write some that only work with nested pairs.
When Racket displays pairs, it puts the dots in somewhat strange places, not just in between each element. How does it decide where to put them?
It puts it before the last element if the last element isn’t null.
Is this useful for MP6?
Probably not. Perhaps if you see periods in your output, it will explain why.
I would like you to go over the check 2 in class.
Okay.
a. How does the base case test for pair recursion differ from the base case test for other types of recursion you have seen?
For list recursion, we have one of two base cases:
(null? lst)
.(null? (cdr lst))
.
For numeric recursion, we usually have base cases like
(zero? n)
,(= n 1)
, or(<= n 1)
.
All of these are what I’d call “positive tests”: Does the parameter look like this?
For pair recursion, our base case test is almost always “is it not a pair?”
(not (pair? param))
. I’d call this a “negative test”.
You see this sometimes in how we write pair recursion. Instead of
(if (base-case-test? param) base-case recursive-case)
, we tend to write(if (pair? param) recursive-case base-case)
, we tend to write
b. Why are there two calls to
sum-of-number-tree
in its recursive case?
The output usually depends on the contents of both subtrees, so we must recurse on both.
Could you describe more what’s happening with cddr
and stuff like
that?
If we think in terms of pairs, each d means “follow the right reference from the pair” and each “a” means follow the left reference. We work right-to-left.
Tennis players understand this as advantage and deuce.
If we think in terms of lists, and only have an a at the front, think of each
d
as representing “drop one element”.
Should combine-pairs-above
look remarkably like combine-pairs-beside
?
Yes.
Can we repeat code in tests?
Yes.
Just for clarity, we get two tokens for turning it in tomorrow and don’t pay any tokens for turning it in on Sunday, right?
Yes.
The first problem requires paper. Die, trees, die! I suppose you could use a whiteboard.