---
title: Eboard 22  Naming local procedures
number: 22
section: eboards
held: 2017-10-13
---
CSC 151.03, Class 22:  Naming local procedures
==============================================

_Overview_

* Preliminaries
    * Notes and news
    * Upcoming work
    * Extra credit
    * Fall Break PSA
    * Questions
* Prebrief
* Quiz
* Lab
* Debrief

### News / Etc.

* Thank you AM.
* Have a wonderful fall break.

### Upcoming Work

* [Writeup for class 21](../writeups/writeup21) due TONIGHT at 10:30 p.m.
    * Exercises 4d and 4e
    * To: <csc151-03-grader@grinnell.edu>
    * Subject: CSC 151.03 Writeup 21 (YOUR NAMES)
* [Writeup for class 22](../writeups/writeup22) due TONIGHT at 10:30 p.m.
    * Exercise 2
    * To: <csc151-03-grader@grinnell.edu>
    * Subject: CSC 151.03 Writeup 22 (YOUR NAMES)

### Extra credit (Academic/Artistic)

### Extra credit (Peer)

### Extra credit (Misc)

### Other good things

### Friday PSA

* You deserve a break.
* Please stay healthy.
* Be moderate.
* Encourage moderation in others.
* Consent is absolutely, positively, necessary.

### Questions

Prebrief
--------

Answers to many of the problems are available at the end of the lab.
**DO NOT REFER TO THE ANSWERS** until you've spent some time working
on the problems yourself.

On Monday, you wrote `all-odd?`.  That pattern will be helpful for at
least one problem on today's lab.

Remember that the single quotation mark means "Take this verbatim 
and **do not evaluate individual elements**."
So, just as `'(a b 3 c)` is the list of the symbols `'a`, `'b`, and
`'c` with an interspersed number `3`, `'(a sqrt 2 (sqrt 2))` is a
list that contains the symbol `'a`, the symbol `'sqrt`, the number 2,
and *a list* of the symbol `'sqrt` and the number 2.

When you hit helper recursion, a table may be helpful.

Quiz
----

When you are done, bring up the lab (not pictures of students in this
class).

Lab
---

### How do I tell if all the elements of numbers are real?

Option 1

```
(letrec ([all-real? (lambda (lst)
                       (or (null? lst)
                           (and (real? (car lst))
                                (all-real? (cdr lst)))))])
  ...
  (cond
    [(not (all-real? numbers))
     ...]
    ...))
```

Option 2

```
(cond
  [(not (all real? numbers))
   ...]
  ...)
```

Debrief
-------
