all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Elisp threading macros
@ 2024-08-28 14:08 Garklein
  2024-08-28 15:51 ` Robert Pluim
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Garklein @ 2024-08-28 14:08 UTC (permalink / raw)
  To: emacs-devel

Hello,

Would it be possible to have the dash.el macros `->', `->>', `-->',
and `-some->' in subr-x.el? I find them to be really useful, and would
love to see them in the base language.

I know that `thread-first' and `thread-last' exist, but I find that my
eyes can recognize `->' and `->>' much easier. `-->' is really nice
for more complex threading.

`-some->' is useful in cases like this:

(let (foo (function-which-may-return-nil))
  (when foo
    (bar foo)))

which can be rewritten, much cleaner, as

(-some-> foo function-which-may-return-nil bar)

Thank you,
Garklein



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-09-01 21:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28 14:08 Elisp threading macros Garklein
2024-08-28 15:51 ` Robert Pluim
2024-08-28 16:42   ` Visuwesh
2024-08-28 17:13     ` Henrik Kjerringvåg
2024-08-28 15:55 ` Eli Zaretskii
2024-08-28 18:23   ` Basil L. Contovounesios
2024-08-31 12:50   ` Augusto Stoffel
2024-08-28 18:05 ` Philip Kaludercic
2024-08-28 19:43   ` Garklein
2024-08-28 19:54     ` Philip Kaludercic
2024-08-29  4:45       ` tomas
2024-08-30  7:30         ` Joost Kremers
2024-08-29 21:19   ` Sean Whitton
2024-08-29 21:46     ` Philip Kaludercic
2024-08-28 18:29 ` Thierry Volpiatto
2024-08-28 19:35   ` Garklein
2024-08-30 12:26     ` Rudolf Adamkovič
2024-08-30 13:12       ` Robert Pluim
2024-08-30 17:15         ` [External] : " Drew Adams
2024-09-01 16:43           ` Alfred M. Szmidt
2024-09-01 21:02             ` Drew Adams
2024-08-29  0:48 ` Po Lu
2024-08-29  5:19 ` Alfred M. Szmidt
2024-08-30  0:57   ` Garklein

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.