Files changed (2)
+ ; (10 points) Define a function longest-satisfying-prefix that takes a list and a unary predicate as argument and returns a copy of the input list, up to but not including the first member that fails to satisfy the predicate. So for example (longest-satisfying-prefix '(16 8 4 2 1) even?) should return (16 8 4 2), as should (longest-satisfying-prefix '(16 8 4 2) even?).
+ ; (10 points) Define a boolean-valued function alist-simple? that takes an association list, and returns #t if and only if all of the members of the assocation list have distinct cars. That is, the function is to return #f precisely when the association list can be replaced by a shorter equivalent association list.