previous
|
index
|
next
Testing for List Membership (Ex. 7.8a)
Desired behavior of procedure
element?
:
(element? 8 (integers-from-to 1 15))
⇒ #t
(element? 20 (integers-from-to 1 15))
⇒ #f
Q
: When is an item an element of a list?
(
Hint
: Answer in terms of the head and the tail.)
previous
|
index
|
next