From: ·······@cad.strath.ac.uk
Subject: what's wrong with this code?
Date:
Message-ID: <8sehka$1d2$1@nnrp1.deja.com>
Hi, below code bunch is a part of Ecobweb.
I tried to load whole codes on MCL, and seems no problem except this one.
When I load below defun, MCL Listner gives me the error message as follow.
> Error: Too many arguments in (FUNCTION EXAMPLE CTREE).
> While executing: CCL::NX1-FUNCTION
> Type Command-. to abort.
The codes are as below.
(defun fill-missing-up-example (example ctree function &rest properties)
(let* ((properties (if properties
(car properties)
(append *design-description* *specifications*)))
(prediction (funcall #'function example ctree))
(current (retrieve-node (node-name prediction) ctree))
)
(loop
(let ((missing-properties
(set-difference properties (class-properties-list prediction)))
)
(cond ( missing-properties
(dolist (property missing-properties)
(cond ((member property (class-properties-list current))
(push property (class-properties-list prediction))
(setf (class-property-seen property prediction) 1)
(change-property-value-node prediction property
(class-prop-val-most-probable property current))
)
))
(if (eq (root ctree) (node-name current))
(return-from fill-missing-up-example prediction)
(setf current (retrieve-node (node-parent current)
ctree)))
)
( t (return-from fill-missing-up-example prediction))
) ; end cond
))))
I am a beginner of Common Lisp, so I can't find why this happen.
Anyone could help me?
Thanx.
Sungwoo
Sent via Deja.com http://www.deja.com/
Before you buy.
·······@cad.strath.ac.uk writes:
> (prediction (funcall #'function example ctree))
this should probably be (funcall function example ctree).
(I think MCLs complaint is a little misguiding, probably it should have
said something like "Error: function names a special form"...)
--
(espen)