On Mon, Mar 29, 2010 at 10:36 AM, Alessandro Serra <span dir="ltr"><<a href="mailto:gas.hale@gmail.com">gas.hale@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
I was playing with "memoize" when I found out that I cannot do it with<br>
recursive compiled functions. A recursive function is usually compiled<br>
as:[...]<br>
> (setf (symbol-function 'f) ...)<br>
 has not effect on the recursive calls of f.<br>

I'm not an expert of common lisp standard. I would like to know if the<br>
ecl's behaviour is correct.<br></blockquote></div><br>Yes, it is. Compiled functions in can use direct references to the code they want to invoke, instead of going through the symbol. Just add (declare (notinline f)) to the top of the function code.<br>
<br>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>