SYSTEM::%EXPAND-FOR:element should be a lambda expression
Posted: Wed Jul 01, 2009 9:28 am
Hello everyone,
I am a new user and very new to Lisp. I would appreciate it if anyone could help me with this.
I have the following code:
"
(defun add-forec ( nexperts rand )
(list (
(make-ex (list (1.0 0 0)))
(make-ex (list (0 1.0 0)))
(make-ex (list (0 0 1.0)))
)))
(defun make-ex ( dist )
(make-instance 'lw-expert :weights dist) )"
as part as a larger piece of code (the rest works perfectly).
When i run it it gives me the following error:
SYSTEM::%EXPAND-FORM: (MAKE-EX (LIST ('1.0 '0 '0))) should be a lambda
expression
With the (little) lisp knowledge i have i know that lamdba expressions are ways of defining functions and recursion. They are passed as arguments and returned as results.
I have already tried treating the numbers as literals using ': (e.g.list ('1.0 '0 '0))
Could anyone tell me if i understood lambda expressions and maybe suggest what the problem may be??
Thank you very much,
Andy
I am a new user and very new to Lisp. I would appreciate it if anyone could help me with this.
I have the following code:
"
(defun add-forec ( nexperts rand )
(list (
(make-ex (list (1.0 0 0)))
(make-ex (list (0 1.0 0)))
(make-ex (list (0 0 1.0)))
)))
(defun make-ex ( dist )
(make-instance 'lw-expert :weights dist) )"
as part as a larger piece of code (the rest works perfectly).
When i run it it gives me the following error:
SYSTEM::%EXPAND-FORM: (MAKE-EX (LIST ('1.0 '0 '0))) should be a lambda
expression
With the (little) lisp knowledge i have i know that lamdba expressions are ways of defining functions and recursion. They are passed as arguments and returned as results.
I have already tried treating the numbers as literals using ': (e.g.list ('1.0 '0 '0))
Could anyone tell me if i understood lambda expressions and maybe suggest what the problem may be??
Thank you very much,
Andy