2015-10-16 HW10

posted Oct 16, 2015, 4:57 AM by Samuel Konstantinovich   [ updated Oct 16, 2015, 6:32 AM ]
Goal: Recursion!

Do Now:

Given the following list: H
'(the (force (is) (strong) in ) this one)
1. What is (cadr H)
2. What is (caddr H)
3. What is (caadr H)
4. What is (cadadr H) 
5. What is (caaddadr H) 

Given the following list L
'( donde (esta el (sanitario) el (queso es viejo) ) y verde)

How do you extract the following words:
6. esta
7. el (1st one)
8. el (2nd one)
9. verde
10. sanitario

Go over homework.

How do you express factorial?



HW10:
Write the function (exponent base power)
1. Come up with a recursive definition on paper:
 - What does (exponent a b) mean in terms of exponent?
 -What is the base case?
2. Write the function in scheme.
(exponent 5 2) -> 25
(exponent 10 3) -> 1000



Comments