title: What is "defun" in Smarty
body: <p>I sometimes see the <strong>defun</strong> function in Smarty. Unfortunately the file compiler.defun.php is not documented, neither could I google anything usefull. So what does defun mean, and what exactly should it do?</p>
  
  <p>Reading the code I reason that it is some sort of function creation, but I can´t think of why someone would define functions withhin a smarty template. Google results often mention iteration recursions, but without giving an example on how defun is related to that.</p>
  
  <p>Thanks</p>