<p>I've been working through <a href="http://gigamonkeys.com/book" rel="nofollow noreferrer">Practical Common Lisp</a> and as an exercise decided to write a macro to determine if a number is a multiple of another number:</p>

<p><code>(defmacro multp (value factor)<br>
   `(= (rem ,value ,factor)  0))</code></p>

<p>so that :
<code>(multp 40 10)</code>
evaluates to true whilst
<code>(multp 40 13)</code>
does not </p>

<p>The question is does this macro <a href="http://gigamonkeys.com/book/macros-defining-your-own.html#plugging-the-leaks" rel="nofollow noreferrer">leak</a> in some way?  Also is this "good" Lisp?  Is there already an existing function/macro that I could have used?</p>

Siebel gives an extensive rundown (for simple cases anyway) of possible sources of leaks, and there aren't any of those here. Both
```
value
```
and
```
factor
```
are evaluated only once and in order, and
```
rem
```
doesn't have any side effects.
This is not good Lisp though, because there's no reason to use a macro in this case. A function
```
```
(defun multp (value factor)
  (zerop (rem value factor)))
```
```
is identical for all practical purposes. (Note the use of
```
zerop
```
. I think it makes things clearer in this case, but in cases where you need to highlight, that the value you're testing might still be meaningful if it's something other then zero,
```
(= ... 0)
```
might be better)