[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

Error Message : Undefined operator

gengyangcai

7/10/2015 11:17:00 AM

What is the problem here ? Output for this should be (A B C)
3
instead I get this error message :

CL-USER 4 : 3 > (most #'length '((a b) (a b c) (a) (e f g)))

Error: Undefined operator MOST in form (MOST (FUNCTION LENGTH) (QUOTE ((A B) (A B C) (A) (E F G)))).
1 (continue) Try invoking MOST again.
2 Return some values from the form (MOST (FUNCTION LENGTH) (QUOTE ((A B) (A B C) (A) (E F G)))).
3 Try invoking something other than MOST with the same arguments.
4 Set the symbol-function of MOST to another function.
5 Set the macro-function of MOST to another function.
6 (abort) Return to level 3.
7 Return to debug level 3.
8 Return to level 2.
9 Return to debug level 2.
10 Return to level 1.
11 Return to debug level 1.
12 Return to level 0.
13 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.
2 Answers

Pascal J. Bourguignon

7/10/2015 1:00:00 PM

0

CAI GENGYANG <gengyangcai@gmail.com> writes:

> What is the problem here ? Output for this should be (A B C)
> 3
> instead I get this error message :
>
> CL-USER 4 : 3 > (most #'length '((a b) (a b c) (a) (e f g)))
>
> Error: Undefined operator MOST in form (MOST (FUNCTION LENGTH) (QUOTE ((A B) (A B C) (A) (E F G)))).
> 1 (continue) Try invoking MOST again.
> 2 Return some values from the form (MOST (FUNCTION LENGTH) (QUOTE ((A B) (A B C) (A) (E F G)))).
> 3 Try invoking something other than MOST with the same arguments.
> 4 Set the symbol-function of MOST to another function.
> 5 Set the macro-function of MOST to another function.
> 6 (abort) Return to level 3.
> 7 Return to debug level 3.
> 8 Return to level 2.
> 9 Return to debug level 2.
> 10 Return to level 1.
> 11 Return to debug level 1.
> 12 Return to level 0.
> 13 Return to top loop level 0.
>
> Type :b for backtrace or :c <option number> to proceed.
> Type :bug-form "<subject>" for a bug report template or :? for other options.

Some people have a very limited number of neurons in their brains.
When they learn something, they have to forget something.

It looks like that when you learn Lisp, you have to forget how to read.

Just read the error message!!!


--
__Pascal Bourguignon__ http://www.informat...
â??The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.� -- Carl Bass CEO Autodesk

Barry Margolin

7/10/2015 2:30:00 PM

0

In article <0f54eab9-f43c-40f6-83a8-60986d6d5a54@googlegroups.com>,
CAI GENGYANG <gengyangcai@gmail.com> wrote:

> What is the problem here ? Output for this should be (A B C)
>
> 3
> instead I get this error message :
>
> CL-USER 4 : 3 > (most #'length '((a b) (a b c) (a) (e f g)))
>
> Error: Undefined operator MOST in form (MOST (FUNCTION LENGTH) (QUOTE ((A B)
> (A B C) (A) (E F G)))).

There's no standard function named MOST, and apparently you never
defined it yourself. How do you expect this to work?

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***