From: Tassilo Horn <tsdh@gnu.org>
To: Jean Louis <bugs@gnu.support>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, help-gnu-emacs@gnu.org
Subject: Re: (*) -> 1
Date: Thu, 19 Jan 2023 16:19:46 +0100 [thread overview]
Message-ID: <87r0vqa67k.fsf@gnu.org> (raw)
In-Reply-To: <Y8lZmM1EQ+wShgt2@protected.localdomain>
Jean Louis <bugs@gnu.support> writes:
> You found examples I am searching, though you can't provide references
> where (*) is useful.
Gosh, Jean, of course nobody would literally write (*) but (apply #'*
...), and you'll find occurrences in emacs:
--8<---------------cut here---------------start------------->8---
find -H . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o
-path \*/MCVS -o -path \*/.src -o -path \*/.svn -o -path \*/.git -o
-path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o
-path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name
\*.out -o -name \*.synctex.gz -o -name \*.o -o -name \*\~ -o -name
\*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o
-name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name
\*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm
-o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o
-name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o
-name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name
\*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl
-o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name
\*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o
-name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name
\*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o
-name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr
-o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o
-name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune
-o -type f \( -iname \*.el \) -exec grep --color=auto -i -nH --null -e
\(apply\ \#\'\\\* \{\} +
./gnus/spam-stat.el:494: (prod (apply #'* probs))
./gnus/spam-stat.el:496: (/ prod (+ prod (apply #'* (mapcar (lambda (x) (- 1 x))
./org/org-plot.el:232: (apply #'* (org--plot/nice-frequency-pick weighted-factors))))
./org/org-plot.el:259: (< (* (apply #'* f-pick) 2-val) 30))
./org/org-plot.el:262: (< (* (apply #'* f-pick) 3-val) 30))
./htmlfontify.el:1055: (let ((n (apply #'* m)))
--8<---------------cut here---------------end--------------->8---
And even more with (apply #'+ ...):
--8<---------------cut here---------------start------------->8---
find -H . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o
-path \*/MCVS -o -path \*/.src -o -path \*/.svn -o -path \*/.git -o
-path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o
-path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name
\*.out -o -name \*.synctex.gz -o -name \*.o -o -name \*\~ -o -name
\*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o
-name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name
\*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm
-o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o
-name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o
-name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name
\*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl
-o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name
\*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o
-name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name
\*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o
-name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr
-o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o
-name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune
-o -type f \( -iname \*.el \) -exec grep --color=auto -i -nH --null -e
\(apply\ \#\'\+ \{\} +
./leim/quail/hangul.el:341: (if (zerop (apply #'+ (append hangul-queue nil)))
./leim/quail/hangul.el:353: (if (not (zerop (apply #'+ (append hangul-queue nil))))
./net/newst-backend.el:2186: (apply #'+
./net/imap.el:1810: (apply #'+ (mapcar #'imap-body-lines body)))
./net/shr.el:2350: (let ((extra (- (apply #'+ (append suggested-widths nil))
./net/shr.el:2351: (apply #'+ (append widths nil))
./treesit.el:2608: (eq 0 (apply #'+ (mapcar #'treesit-node-child-count children))))
./textmodes/texinfmt.el:2044: (apply #'+ texinfo-multitable-width-list))))
./gnus/gnus-picon.el:217: (setq len (apply #'+ (mapcar (lambda (x)
./gnus/gnus-cache.el:889: (apply #'+ entry)
./gnus/gnus-score.el:2560: (apply #'+ (mapcar
./gnus/gnus-sum.el:3836: (apply #'+ (mapcar
./gnus/gnus-sum.el:8840: (apply #'+ (mapcar #'gnus-summary-limit-children
./gnus/gnus-agent.el:4139: (apply #'+ entry)
./gnus/spam-stat.el:515: (apply #'+ scores))))
./calendar/solar.el:753: (apply #'+
./calendar/solar.el:941: (S (apply #'+ (mapcar (lambda(x)
./calendar/todo-mode.el:3697: (mapcar (lambda (i) (apply #'+ (mapcar (lambda (x) (aref (cdr x) i))
./ses.el:625: ses--linewidth (apply #'+ -1 (mapcar #'1+ widths))
./ses.el:4037: (apply #'+ (apply #'ses-delete-blanks args)))
./ses.el:4044: (/ (float (apply #'+ list)) (length list)))
./org/org-plot.el:246: (let* ((total-count (apply #'+ (mapcar #'cdr frequencies)))
./org/org-colview.el:1261: (format (or printf "%s") (apply #'+ (mapcar #'string-to-number values))))
./org/org-colview.el:1265: (format "%.2f" (apply #'+ (mapcar #'string-to-number values))))
./org/org-colview.el:1306: (/ (apply #'+ (mapcar #'string-to-number values))
./org/org-colview.el:1324: (lambda (&rest values) (/ (apply #'+ values) (float (length values))))
./org/org-colview.el:1340: (/ (apply #'+ (mapcar #'org-columns--age-to-minutes ages))
./org/org-clock.el:2626: (total-time (apply #'+ (mapcar #'cadr tables)))
./minibuffer.el:2025: (apply #'+ (mapcar #'string-width s))
./minibuffer.el:2068: (apply #'+ (mapcar #'string-width str))
./pcomplete.el:943: (let* ((envpos (apply #'+ (mapcar #' length strings)))
./progmodes/cc-guess.el:368: (apply #'+
./progmodes/sql.el:3639: (apply #'+ (mapcar (lambda (ch) (if (eq ch ?\n) 1 0))
./progmodes/vhdl-mode.el:7480: (apply #'+ (mapcar #'vhdl-get-offset syntax)))
./obsolete/thumbs.el:207: (dirsize (apply #'+ (mapcar (lambda (x) (cadr x)) files-list))))
./obsolete/landmark.el:1428: (apply #'+
./emacs-lisp/memory-report.el:254: (apply #'+
./emacs-lisp/bytecomp.el:4515: (let ((nvalues (apply #'+ (mapcar (lambda (case) (length (car case)))
./emacs-lisp/smie.el:2219: (cl-assert (= total (apply #'+ (mapcar #'cdr off-alist))))
--8<---------------cut here---------------end--------------->8---
It's totally sensible to be able to compute the product/sum of an
arbitrary number of numbers.
All these would need checks for non-empty lists or even lists of at
least 2 numbers if + and * would require at least 1 or 2 arguments.
Bye,
Tassilo
next prev parent reply other threads:[~2023-01-19 15:19 UTC|newest]
Thread overview: 149+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 20:53 How to make M-x TAB not work on (interactive) declaration? Jean Louis
2023-01-07 21:11 ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-01-07 23:40 ` Jean Louis
2023-01-08 6:06 ` Eli Zaretskii
2023-01-08 6:19 ` Emanuel Berg
2023-01-09 4:49 ` Jean Louis
2023-01-09 6:26 ` algorithmic Lisp language (was: Re: How to make M-x TAB not work on (interactive) declaration?) Emanuel Berg
2023-01-09 19:30 ` Jean Louis
2023-01-09 19:32 ` Jean Louis
2023-01-08 6:21 ` How to make M-x TAB not work on (interactive) declaration? Jean Louis
2023-01-08 6:32 ` Emanuel Berg
2023-01-08 10:38 ` Eli Zaretskii
2023-01-08 8:34 ` Tassilo Horn
2023-01-08 11:01 ` Eli Zaretskii
2023-01-09 13:29 ` Tassilo Horn
2023-01-08 21:35 ` Jean Louis
2023-01-08 22:35 ` [External] : " Drew Adams
2023-01-09 0:24 ` Emanuel Berg
2023-01-09 19:47 ` Jean Louis
2023-01-10 23:28 ` Emanuel Berg
2023-01-13 6:21 ` (*)->1 Jean Louis
2023-01-14 12:03 ` (*)->1 Michael Heerdegen
2023-01-14 12:33 ` (*)->1 Michael Heerdegen
2023-01-15 20:18 ` [External] : Re: How to make M-x TAB not work on (interactive) declaration? Rudolf Adamkovič
2023-01-15 20:57 ` Jean Louis
2023-01-15 22:33 ` Drew Adams
2023-01-15 23:10 ` Emanuel Berg
2023-01-16 15:28 ` Jean Louis
2023-01-16 17:07 ` Drew Adams
2023-01-16 18:25 ` Jean Louis
2023-01-17 2:20 ` Drew Adams
2023-01-17 5:28 ` tomas
2023-01-17 22:20 ` Drew Adams
2023-01-18 5:14 ` tomas
2023-01-18 5:26 ` Emanuel Berg
2023-01-19 11:38 ` tomas
2023-01-19 11:51 ` Emanuel Berg
2023-01-21 14:05 ` tomas
2023-01-23 10:14 ` Robert Pluim
2023-01-23 16:44 ` Michael Heerdegen
2023-01-23 19:28 ` tomas
2023-01-18 17:27 ` Drew Adams
2023-01-18 17:32 ` tomas
2023-01-18 14:32 ` Jean Louis
2023-01-18 20:36 ` Drew Adams
2023-01-19 9:05 ` (*) -> 1 Jean Louis
2023-01-19 9:41 ` Yuri Khan
2023-01-19 12:52 ` Anders Munch
2023-01-17 5:35 ` [External] : Re: How to make M-x TAB not work on (interactive) declaration? Jean Louis
2023-01-17 15:59 ` Yuri Khan
2023-01-17 16:42 ` Jean Louis
2023-01-17 16:05 ` Michael Heerdegen
2023-01-17 16:17 ` Yuri Khan
2023-01-17 16:25 ` tomas
2023-01-17 16:55 ` (*) -> 1 Jean Louis
2023-01-17 17:52 ` Michael Heerdegen
2023-01-17 18:11 ` Óscar Fuentes
2023-01-17 18:40 ` Jean Louis
2023-01-17 19:04 ` Óscar Fuentes
2023-01-18 13:15 ` Jean Louis
2023-01-18 14:37 ` Óscar Fuentes
2023-01-18 18:17 ` [External] : " Drew Adams
2023-01-17 19:35 ` Michael Heerdegen
2023-01-17 21:12 ` Michael Heerdegen
2023-01-17 22:01 ` Óscar Fuentes
2023-01-17 23:38 ` Michael Heerdegen
2023-01-18 7:50 ` Óscar Fuentes
2023-01-18 8:37 ` tomas
2023-01-18 12:46 ` Óscar Fuentes
2023-01-18 13:44 ` Michael Heerdegen
2023-01-18 14:07 ` Óscar Fuentes
2023-01-18 16:19 ` Andreas Eder
2023-01-18 17:14 ` Óscar Fuentes
2023-01-17 18:18 ` Jean Louis
2023-01-17 11:52 ` [External] : Re: How to make M-x TAB not work on (interactive) declaration? Michael Heerdegen
2023-01-15 21:08 ` Jean Louis
2023-01-16 5:02 ` Emanuel Berg
2023-01-16 5:38 ` tomas
2023-01-16 10:10 ` Jean Louis
2023-01-16 10:41 ` Yuri Khan
2023-01-16 15:26 ` Jean Louis
2023-01-17 4:06 ` Emanuel Berg
2023-01-17 14:00 ` tomas
2023-01-17 22:43 ` Emanuel Berg
2023-01-17 16:25 ` Nick Dokos
2023-01-17 17:19 ` Jean Louis
2023-02-11 4:38 ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-02-11 10:54 ` Jean Louis
2023-01-17 17:41 ` Nick Dokos
2023-01-16 7:55 ` Yuri Khan
2023-01-16 10:16 ` Jean Louis
2023-01-16 10:37 ` Yuri Khan
2023-01-16 15:35 ` Jean Louis
2023-01-16 15:59 ` Yuri Khan
2023-01-16 16:14 ` Jean Louis
2023-01-16 16:47 ` tomas
2023-01-16 17:07 ` Drew Adams
2023-01-16 18:41 ` Jean Louis
2023-01-16 10:51 ` Anders Munch
2023-01-16 15:38 ` Jean Louis
2023-01-16 17:40 ` Andreas Eder
2023-01-16 18:17 ` tomas
2023-01-16 18:55 ` Jean Louis
2023-01-16 19:14 ` tomas
2023-01-16 18:46 ` Jean Louis
2023-01-17 2:37 ` Eduardo Ochs
2023-01-17 5:46 ` (*) -> 1 Jean Louis
2023-01-17 15:56 ` Michael Heerdegen
2023-01-17 16:29 ` Jean Louis
2023-01-17 16:43 ` tomas
2023-01-17 17:25 ` Jean Louis
2023-01-17 19:11 ` Nick Dokos
2023-01-17 17:17 ` Michael Heerdegen
2023-01-17 17:26 ` Jean Louis
2023-01-17 18:46 ` Michael Heerdegen
2023-01-17 18:51 ` Jean Louis
2023-01-17 18:04 ` Jean Louis
2023-01-17 18:28 ` Eduardo Ochs
2023-01-17 19:18 ` Michael Heerdegen
2023-01-18 12:27 ` Jean Louis
2023-01-18 13:37 ` Michael Heerdegen
2023-01-19 8:20 ` Jean Louis
2023-01-19 10:06 ` Tassilo Horn
2023-01-19 13:43 ` Michael Heerdegen
2023-01-19 14:42 ` Jean Louis
2023-01-19 15:27 ` tomas
2023-01-18 13:57 ` Óscar Fuentes
2023-01-19 8:32 ` Jean Louis
2023-01-19 16:51 ` Óscar Fuentes
2023-01-20 8:01 ` Jean Louis
2023-01-18 14:25 ` Michael Heerdegen
2023-01-19 8:34 ` Jean Louis
2023-01-19 13:54 ` Michael Heerdegen
2023-01-19 14:54 ` Jean Louis
2023-01-19 15:19 ` Tassilo Horn [this message]
2023-01-19 15:46 ` Michael Heerdegen
2023-01-19 17:38 ` Dr Rainer Woitok
2023-01-20 7:31 ` Jean Louis
2023-01-20 11:49 ` Dr Rainer Woitok
2023-01-19 17:44 ` [External] : " Drew Adams
2023-01-19 21:29 ` Michael Heerdegen
2023-01-20 7:40 ` Jean Louis
2023-01-20 8:47 ` Emanuel Berg
2023-01-18 9:02 ` Anders Munch
2023-01-18 10:49 ` Michael Heerdegen
2023-01-18 11:10 ` Emanuel Berg
2023-01-18 12:48 ` Eli Zaretskii
2023-01-18 14:29 ` Michael Heerdegen
[not found] ` <87k01lica7.fsf@eder.anydns.info>
2023-01-17 16:04 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0vqa67k.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=bugs@gnu.support \
--cc=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).