As a result of musings around an exercism problem, I am trying to write a function that takes an input number and an arbitrary length list of divisors to test, along with the expected divisibility (i.e. remainder 0) as a boolean, returning true if all expectations are met (defaulting to true if unspecified).
example input:
(divisible-by 10 (5 t) (4 f) 2) => t
My reading has lead to this attempt at creating the input for the function:
(defun divisible-by (numerator &rest args (&key divisors (divisorp t)))
(loop...))
My simple test cases for such an input type error out in various ways, and my searching via Google and directly here on Stack Overflow have not proved fruitful, leading me to believe my understanding is insufficient to generate the right keywords.
Pointers on how to implement such a function, where my attempts fall down or why such a function cannot be implemented as I have outlined would be gratefully received.