This class will be recorded! Its use is limited to members of the class. Please do not share with others.
Approximate overview
Events
I’m not sure if all of these links are correct. Let me know if any are not.
What are good edge cases?
It depends on the situation.
For lists, here are things I normally make sure to check.
* Empty lists (input, results)
* Something special about the first element
* Something special about the last element
* Repeated elements
For integers, here are things I normally make sure to check.
* Zero
* Negative numbers (as appropriate)
* Large positive numbers
For real or rational numbers, I generally add
* Non-integers
* Really small numbers (e.g., 1/1000000000)
* Both exact and inexact
For numbers, I generally add
* Complex numbers (negative and positive real part, negative and
positive imaginary part)
In the roll-a-die procedure from the reading, why is the lambda empty?
- So that it’s a procedure.
- You’ll understand better in lab why we want a procedure and not just a value.
With pattern matching, do we have to document the variables from the matching in our documentation?
No. The assumption is that the reader can see the variables in the patterns.
(match lst
[(cons x xs) ; the reader should say "This matches a
; nonempty list, and we'll be using 'x'
; to refer to the car and 'xs' to refer
; to the cdr Lab ---