Lecture 26 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

Using the definition for natural numbers that we developed in class, write a function mod-list with the following contract, purpose, and heading:

;; mod-list:  natnum natnum -> list-of-natnum OR string
;; produces list of numbers greater than 0 and less than or equal to 
;; limit which are evenly divisible by divisor;  or produces 
;; "can't divide by zero" if the divisor is zero
(define (mod-list limit divisor)...)
[Hint: you may use the built-in function modulo, defined in the Help Desk]

[Another hint:

(check-expect (mod-list 60 12) (list 60 48 36 24 12))

]