[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: disassembling list to its elements
From: |
Pascal Bourguignon |
Subject: |
Re: disassembling list to its elements |
Date: |
Wed, 15 Mar 2006 16:51:10 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
empty <null7@wp.pl> writes:
> Is it possible in elisp to pass elements of the list as params to some
> method, something like disassembling the list into pieces.
> To be more clear, something what `GET-ELEMS-HOWTO' would do.
>
> (let ((param-list '("par1" "par2")))
> (message "%s %s" (GET-ELEMS-HOWTO param-list)))
>
> ||
> ||
> \||/
> \/
>
>
> (let ((param-list '("par1" "par2")))
> (message "%s %s" "par1" "par2"))
You can use apply, which is done for that:
(apply (function message) "%s %s" param-list)
--
__Pascal Bourguignon__ http://www.informatimago.com/
"A TRUE Klingon warrior does not comment his code!"