This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: ((cadr lst) (car lst) (caddr lst)) Won't work
- From: Per Bothner <per at bothner dot com>
- To: Morven Sun <sunixm at gmail dot com>
- Cc: kawa at sourceware dot org
- Date: Thu, 13 Jun 2013 00:12:20 -0700
- Subject: Re: ((cadr lst) (car lst) (caddr lst)) Won't work
- References: <CAKZUWfg5L79gUy7_meaqBR=R0nR+NRny-5pbsZR0qSpA=NfXNQ at mail dot gmail dot com>
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/