The difference between the abstraction `locate' and `memberp' consists in the first argument being a condition for `memberp' and not a predicate function.
`memberp' appears in this category because it is used by the abstraction `create a union of two sets'.
(define memberp (lambda(x s) (if (nullp s) false (if (equaln x (car s) true (memberp x (cdr s))))))) |
(define l1 (cons one (cons two (cons three (cons four nil))))) ; (bdisp! (memberp three l1)) --> true ; (bdisp! (memberp five l1)) --> false |
Georg P. Loczewski 2004-03-05