Code: Select all
(define (foo)
(doargs (i) (println i)))Code: Select all
(foo a b c x e f g)Now, suppose I have a list that looks like this:
Code: Select all
(set 'lst '(a b c x e f g))one item at a time by 'doargs?
Thanks
tim
Code: Select all
(define (foo)
(doargs (i) (println i)))Code: Select all
(foo a b c x e f g)Code: Select all
(set 'lst '(a b c x e f g))Code: Select all
> (apply foo lst)
a
b
c
x
e
f
g
g
>
Jeff wrote:(cons foo lst)
Code: Select all
> (cons foo lst)
((lambda ()
(doargs (i)
(println i))) a b c x e f g)Code: Select all
> (apply foo lst)
a
b
c
x
e
f
g
g
>
Yes! Thank you sir!Lutz wrote:we posted together ;-) the answer again:
Code: Select all
> (apply foo lst) a b c x e f g g >
Code: Select all
(eval (cons foo lst))