This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ((cadr lst) (car lst) (caddr lst)) Won't work


On 06/12/2013 06:18 PM, Morven Sun wrote:
After I defined (define lst '(1 + 2)),
((cadr lst) (car lst) (caddr lst)) would not work as (+ 1 2), but
gives the error msg:
Argument '+' to 'apply-to-args' has wrong type

Note the actual error message is:

Argument '+' to 'apply-to-args' has wrong type (gnu.mapping.SimpleSymbol) (expected: procedure)

This should have given you a hint as to the problem.
True - the raw Java classname "gnu.mapping.SimpleSymbol" is not
as obvious as I'd like.  I'm considering defining a new type
alias simple-symbol for SimpleSymbol, which would improve the
error message to:

Argument '+' to 'apply-to-args' has wrong type (simple-ymbol) (expected: procedure)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]