[Chicken-users] understanding eval

2008-02-22 Thread Daishi Kato
Hi, This might be a stupid question, but would someone help me understand the following eval example? I was expecting to get 1. Daishi 8--8--8--8--8--8--8--8-- CHICKEN Version 2.732 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook cross ]

Re: [Chicken-users] understanding eval

2008-02-22 Thread Peter Bex
On Fri, Feb 22, 2008 at 09:22:36PM +0900, Daishi Kato wrote: Hi, This might be a stupid question, but would someone help me understand the following eval example? I was expecting to get 1. You're evaluating (car (1 2 3)) You want to be evaluating (car (list 1 2 3)) or (car (quote (1 2 3)))

Re: [Chicken-users] understanding eval

2008-02-22 Thread Daishi Kato
OK, so that was stupid. How about this? (define a 'values) (define b '((1 2 3) #(4 5 6)) I'd like to evaluate (values '(1 2 3) '#(4 5 6)) using eval, a and b. --daishi At Fri, 22 Feb 2008 13:29:55 +0100, Peter Bex wrote: On Fri, Feb 22, 2008 at 09:22:36PM +0900, Daishi Kato wrote: Hi,

Re: [Chicken-users] understanding eval

2008-02-22 Thread Peter Bex
On Fri, Feb 22, 2008 at 09:57:42PM +0900, Daishi Kato wrote: OK, so that was stupid. How about this? (define a 'values) (define b '((1 2 3) #(4 5 6)) I'd like to evaluate (values '(1 2 3) '#(4 5 6)) using eval, a and b. More of the same: (eval (cons a (map (cut list 'quote ) b)))