[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copying a list for insertion
From: |
tomas |
Subject: |
Re: Copying a list for insertion |
Date: |
Sat, 22 Oct 2022 09:07:49 +0200 |
On Sat, Oct 22, 2022 at 09:43:31AM +0300, Jean Louis wrote:
> * Heime <heimeborgia@protonmail.com> [2022-10-22 04:03]:
[...]
> > "cond" allows multiple body-forms in one clause. Thusly no need for
> > "progn".
>
> Show me how please. I do not understand it.
Heime is right:
(defun do-something (arg)
(cond
((eq arg 'this)
(message "yes, this")
(message "did I say this?")
(message "yes, I said"))
((eq arg 'that)
(message "what was that?")
(message "this example gets boring"))
(t
(message "what?"))))
(do-something 'this)
Besides, the doco says that a clause returns its last espression's
value, so it does behave like many little progn.
Cheers
--
t
signature.asc
Description: PGP signature
- Re: Copying a list for insertion, (continued)
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Jean Louis, 2022/10/21
- Re: Copying a list for insertion, Heime, 2022/10/21
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, Heime, 2022/10/22
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion,
tomas <=
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/25
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/22
- Re: Copying a list for insertion, Jean Louis, 2022/10/22
- Re: Copying a list for insertion, Emanuel Berg, 2022/10/25
- Re: Copying a list for insertion, Jean Louis, 2022/10/21