GNU bug report logs -
#56875
29.0.50; [PATCH] Add thread-as macro
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Mon, 1 Aug 2022 17:08:02 UTC
Severity: wishlist
Tags: moreinfo, patch, wontfix
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[[[ 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. ]]]
> + (thread-as x
> + 4
> + (- 10 x)
> + (/ x 2))
I propose a different syntax which is more Lispy than thread-as, and
more self-evident:
(let-successive ((x 4
(- 10 x)))
(/ x 2))
A Lisper can guess what it means, without having read a description.
It lends itself to a generalization where there is more than
one bound variable, each of which can have several values:
(let-successive ((x 4
(- 10 x))
(y 6
(- 12 y)))
(* x y))
=> 36
The values after the first can refer to all of the variables,
since all of them are already bound (to the previous values)
at that point.
--
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)
This bug report was last modified 2 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.