I sometimes see the defun 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?
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.
Thanks