bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `


From: Michael Heerdegen
Subject: bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `Calling Functions'
Date: Sat, 23 Oct 2021 13:58:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Kangas <stefan@marxist.se> writes:

> How about zerop?
>
>     (defalias 'zerop (apply-partially '= 0)
>       "Return t if argument is zero.")
>
> But I guess `=' is also N-ary...

How about

(defalias 'max-positive (apply-partially #'max 0)
  "Return the largest non-negative argument or 0 if all are negative.")

Or something like

(apply-partially #'seq-concatenate 'vector)

or

(defalias 'user-file-name-concat
  (apply-partially #'file-name-concat (expand-file-name "~/")))

?

Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]