title: LISP dynamically define functions
body: <p>I want to define a function with a parameter that defines another function with that parameter as the name.</p>
  
  <p>example that dont work:</p>
  
  <pre><code>(DEFUN custom (name op const var)
    (DEFUN name (var) (op const var)))
  </code></pre>
  
  <p>The problem is that name isnt evaluated and so the function that is defined is always called name.</p>
  
  <p>I know that <code>FUNCALL</code> and <code>APPLY</code> can evaluate parameter dynamically, but i don't know how to call <code>FUNCALL</code> <code>DEFUN...</code> correctly.</p>