Re: [gambit-list] (eval (cons func '(1 2))) don't work
20 Aoû
2007
20 Aoû
'07
11:03
[replying to list this time - realised my last example below is probably what you intended] it think it does work - the error seems reasonable to me. what are you trying to do?
(define (func x y) (+ x y)) (eval (func 1 2)) 3 1> (eval '(func 1 2)) 3 (eval `(func ,@'(1 2))) 3 1> (eval '(cons 4 (func 1 2))) (4 . 3) 1> (eval (cons 'func '(1 2))) 3
(eval (func 1 2)) is (eval 3) which is 3 (eval '(func 1 2)) evaluates the quoted expression (eval `(func ,@'(1 2))) is (eval '(func 1 2)) (eval (cons 'func '(1 2))) is (eval (func 1 2)) andrew
Afficher les réponses par date
6872
Âge (en jours)
6872
Dernière activité (en jours)
0 commentaires
1 participants
participants (1)
-
andrew cooke