[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code for cond*
From: |
Richard Stallman |
Subject: |
Re: Code for cond* |
Date: |
Fri, 19 Jan 2024 22:39:38 -0500 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> apologies if it was discussed already, wanted to ask: what is the reason
> for some of these cond* clauses to keep the binding in effect outside
> the clause itself and for the whole cond* construct?
One of the long-bemoaned inconveniences of cond is that often in
mid-cond one wants to bind some variables and then proceed with more
cond clauses. Lisp programmers have complained about this for
decades. Sure, you can do
(t (let ((temp (cadr whatsis)))
(cond ((eq temp 'foo))
...
but this increases the indentation by 11 columns.
bind* gives the same effect without deeper nesting.
Consider the definition of cond*-subpat. If I rewrite that using
cond*, I would bind a variable to (car subaat) after the clauses that
deal with atomic subpatterns.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Re: Code for cond*, (continued)
- Re: Code for cond*, Emanuel Berg, 2024/01/24
- Re: Code for cond*, Alan Mackenzie, 2024/01/24
- Re: Code for cond*, Emanuel Berg, 2024/01/24
- Re: Code for cond*, Po Lu, 2024/01/25
- Re: Code for cond*, Emanuel Berg, 2024/01/25
- Re: Code for cond*, Po Lu, 2024/01/25
- Re: Code for cond*, Emanuel Berg, 2024/01/25
- Re: Code for cond*, Stefan Kangas, 2024/01/25
Re: Code for cond*,
Richard Stallman <=
Re: Code for cond*, Stefan Monnier, 2024/01/23
- Re: Code for cond*, JD Smith, 2024/01/23
- Re: Code for cond*, Stefan Kangas, 2024/01/24
- Re: Code for cond*, JD Smith, 2024/01/24
- Re: Code for cond*, Stefan Monnier, 2024/01/24
- Re: Code for cond*, Stefan Monnier, 2024/01/24
- Re: Code for cond*, JD Smith, 2024/01/24
- Re: Code for cond*, Stefan Monnier, 2024/01/24
- RE: [External] : Re: Code for cond*, Drew Adams, 2024/01/24
RE: [External] : Re: Code for cond*, Drew Adams, 2024/01/24