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, 28 Jun 2014 21:37:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> > Say that
> > 
> >   (apply-partially f arg_1 ... arg_n) 
> > 
> > is equivalent to
> > 
> >   (lambda (&rest args) (apply f arg_1 ... arg_n args))
>
> Sorry, I don't see how this is an improvement.

It's an improvement because it's short and clearer than any text that
just tries to describe it.

> Accidentally, the current text is a bit different from what you cited:

I didn't cite anything, I just said that I don't find it clear, because
I think it can be misunderstood.

> > And I think that the paragraph about `apply-partially` should be merged
> > into the later text talking about functionals, because the main use case
> > of `apply-partially` is to construct anonymous functions for usage as
> > argument to some other function.
>
> If you mean this:
>
>      It is common for Lisp functions to accept functions as arguments or
>   find them in data structures (especially in hook variables and property
>   lists) and call them using `funcall' or `apply'.  Functions that accept
>   function arguments are often called "functionals".
>
>      Sometimes, when you call a functional, it is useful to supply a no-op
>   function as the argument.  Here are two different kinds of no-op
>   function:
>
> then it directly follows the part we were talking about.

I were talking about both parts, and that we should say that
`apply-partially` is, like ignore and identity, as well mainly useful in
combination with functionals.  That's all.

Eli, dunno why, but our discussions don't yield any results most of the
time.  I would like to stop here, ok?

Michael.





reply via email to

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