[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: apply
From: |
Mikael Djurfeldt |
Subject: |
Re: apply |
Date: |
Wed, 3 Aug 2005 14:17:51 +0200 |
On 8/3/05, Aurelien Chanudet <address@hidden> wrote:
> Hi all,
>
> Consider the following code :
>
> guile> (define x '( (1 1) (2 2) (3 3) ))
> guile> (apply (lambda (a b c) (map list a b c) x)
> ((1 2 3) (1 2 3))
>
> I can't figure out a concise an elegant way to achieve the same result
> using a lambda form that will work whatever the length of x. Any
> suggestion ?
Well, using a lambda form in the same way as above, it would be:
(apply (lambda args (apply map list args)) x)
but it's simpler to do
(apply map list x)
M
- apply, Aurelien Chanudet, 2005/08/03
- Re: apply,
Mikael Djurfeldt <=