Functional Problem Solving (CSC 151 2016S) : Outlines

Outline 37: Pairs and Pair Structures


Held: Monday, 11 April 2016

Back to Outline 36 - Randomized (Unpredictable) Drawing. On to Outline 38 - Vectors.

Summary

We consider pairs, the basic data type used to build lists and other structures in Scheme. We also consider why it is useful to understand about pairs.

Related Pages

Overview

Administrivia

Reminders

Upcoming Work:

Extra Credit

Academic / Artistic

Peer

Miscellaneous

Regular Peer

Misc

Far in the Future

Questions

I'm having trouble with postconditions for rac and rcd.

For rdc, you can talk about the length of the list and the value at each position.

For rac, you can probably rely on list-ref to clarify the
postcondition.

Can we use position-distance in solving the stenciled circle problem?

Yes.

Can we text you with questions tonight?

Yes. But before 10 p.m. (You can email after 10 p.m.; the odds are that I'll still be awake.)

Are there positive aspects to your failure to grade exam 2 in a timely fashion?

Yes. I am much less likely to take off for formatting and insufficient examples on exam 3.

What should index-of-substring return if there are multiple matching positions?

Any of those positions (usually the first).

Any hints on finding the errors?

Be thorough. If it were me, I'd try more substring sizes and more substring positions.

Cons Cells

Dotted Pairs

Why Care?

Lab