Hello, group.
please explain why I get an error here:
(setq a #( #'(lambda() 0)))
(funcall (aref a 0))
Funcall complains #'(lambda nil 0) is not a name of a function. So,
the problem is to call a function which is stored in an array. Maybe
other standart solutions exist to have a handful of lambda functions
and refer a particular function to get it evaluated?
--
Andrei Zorine
>>>>> On 9 Feb 2004 14:25:28 -0800, Andrei Zorine ("Andrei") writes:
Andrei> Hello, group.
Andrei> please explain why I get an error here:
Andrei> (setq a #( #'(lambda() 0)))
Andrei> (funcall (aref a 0))
Look at what's in (AREF A 0)
and compare with (FUNCTION (LAMBDA () 0))
and compare with (SETQ B #((+ 1 2) GOODIE))
·····@uic.nnov.ru (Andrei Zorine) writes:
> Hello, group.
> please explain why I get an error here:
> (setq a #( #'(lambda() 0)))
> (funcall (aref a 0))
>
> Funcall complains #'(lambda nil 0) is not a name of a function. So,
> the problem is to call a function which is stored in an array. Maybe
> other standart solutions exist to have a handful of lambda functions
> and refer a particular function to get it evaluated?
Arrays written like #() are self-evaluating, meaning that the FUNCTION
special form isn't evaluated. Try `#(,#'(lambda () 0)) instead.
Regards,
'mr
--
[Emacs] is written in Lisp, which is the only computer language that is
beautiful. -- Neal Stephenson, _In the Beginning was the Command Line_