Dear Lispers,
I am passing a function to another function and would
like to ensure fastest compilation.
How can I tell the compiler that the passed
function returns a double-float?
Example
(defun bla (gugu)
(funcall gugu 10.0d0))
I already do
...
(the double-float (funcall gugu 10.0d0))
but the compiler (CMUCL) is still not happy.
Thanx for your help,
Heiko
PS ... or would you do this with overloading a generic function and not
passing a function? Are generic functions slow?
(declare (type (function <arglist> double-float) <variable>))
See the entry for the system class function in the hyperspec.
///
--
In a fight against something, the fight has value, victory has none.
In a fight for something, the fight is a loss, victory merely relief.
> How can I tell the compiler that the passed
> function returns a double-float?
>
> Example
> (defun bla (gugu)
> (funcall gugu 10.0d0))
Python understands
(defun bla (gugu)
(declare (type (function * double-float) gugu))
(funcall gugu 10.0d0))