[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Code for cond*
From: |
Andrea Corallo |
Subject: |
Re: Code for cond* |
Date: |
Thu, 18 Jan 2024 10:44:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Richard Stallman <rms@gnu.org> writes:
> [[[ 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. ]]]
>
> Here is the first draft of cond*. I have tested some cases
> but I ask others to help in testing it more thoroughly.
>
> I invite constructive comments, bug reports, patches,
> and suggestions.
>
> First, here is the draft documentation.
>
>
> A cond* clause is a "non-exit" clause if it (1) starts with t, (2) has
> only one element, or (3) has a keyword as the first or last element.
> After a non-exit clause finishes, control proceeds to the following
> clause.
>
> All other clauses are like cond clauses, in that when the condition is
> true, it executes its clause body and then exits the cond*.
>
> (cond*
> ;; Same as a clause in `cond',
> (CONDITION
> DO-THIS-IF-TRUE-THEN-EXIT...)
>
> ;; Execute FORM, and ignore its value
> ;; (except if this is the last clause).
> (FORM)
>
> ;; Variables to bind, as in let*, around the rest
> ;; of the cond*.
> ((bind* (x foobar) y z (foo 5) a))
> ;; Bindings continue in effect for the whole cond* construct.
Hi Richard,
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? At first glance it
doesn't look very idiomatic in Lisp terms to me.
Thanks!
Andrea
- Code for cond*, Richard Stallman, 2024/01/17
- Re: Code for cond*,
Andrea Corallo <=
- Re: Code for cond*, João Távora, 2024/01/19
- Re: Code for cond*, Richard Stallman, 2024/01/20
- Re: Code for cond*, Adam Porter, 2024/01/21
- Re: Code for cond*, tomas, 2024/01/22
- Re: Code for cond*, Richard Stallman, 2024/01/23
- Re: Code for cond*, Po Lu, 2024/01/24
- Re: Code for cond*, Stefan Kangas, 2024/01/24
- Re: Code for cond*, João Távora, 2024/01/24
- Re: Code for cond*, João Távora, 2024/01/24
- Re: Code for cond*, Po Lu, 2024/01/24