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, provided you’re submitting your MP6 late.
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 normally check for the base case with
(null? lst)
or(null? (cdr lst))
.
For numeric recursion, we normally check for the base case with
(zero n)
, or(= 1 n)
, or(<= n 1)
?
I would call these “positive” tests. “Does the parameter have this characteristic?”
For pair structure recursion, our base is usually “Is this not a pair?”
(not (pair? param))
. So we’re asking for a negative characteristic, rather than a positive characteristic.
Normal recursion often looks like
(if (base-case-test param) base-case recursive-case)
Pair recursion often looks like
(if (pair? param) recursive-case base-case)
b. Why are there two calls to
sum-of-number-tree
in its recursive case?
Because the final value depends on both subtrees.
Could you describe more what’s happening with cdadr
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 refrence.
If we think in terms of lists, and only have an a at the front, think of each
d
as representing “drop one element”.caddr
cdddr
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.