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] |
You could also do this without having to use EVAL by writing (list 1 + 2) instead of '(1 + 2), looked like you perhaps misunderstood the QUOTE special form. I attach a patch that cleans up the error message. Charles. On 13 June 2013 08:12, Per Bothner <per@bothner.com> wrote: > 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/
Attachment:
simple_symbol.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |