[gambit-list] (eval (cons func '(1 2))) don't work
Marc Feeley
feeley at iro.umontreal.ca
Mon Aug 20 16:16:03 EDT 2007
On 20-Aug-07, at 3:06 PM, naruto canada wrote:
> oops, forgot to reply to list.
>
> apply won't work more then one parameters (I've tried it):
> (prop-calc (lambda (p q) (iff (implies p q) (implies (not q) (not
> p))))
> (cross-product '((#t #f)(#t #f)))
> )
I'm not sure what you tried but Gambit supports a multiple argument
apply (the last argument is a list of the remaining arguments. So:
> (apply + '(1 2 3 4))
10
> (apply + 1 '(2 3 4))
10
> (apply + 1 2 '(3 4))
10
> (apply + 1 2 3 '(4))
10
> (apply + 1 2 3 4 '())
10
Marc
More information about the Gambit-list
mailing list