title: Lisp - prime number
body: <p>I am trying to learn lisp and I have some difficulties with prime numbers. I need a function <code>is-prime</code> and if it is prime I have to return <code>t</code> and if it is not I have to return <code>nil</code>. </p>
  
  <pre><code>(prime 41) =&gt; t
  
  (prime 35) =&gt; nil
  </code></pre>
  
  <p>So far I've got:</p>
  
  <pre><code>(defun is-prime (n d) 
    (if (= d 1) 
        (print "t") 
        (if (= (% n d) 0) 
            (print "nil") 
            (is-prime (n (- d 1) )))))
  </code></pre>
  
  <p>but I have 2 parameters there and I have no idea how to use only one. Plus, it's not working at all. Can anyone help me with this? Thanks!</p>