3

From :h Partial:

A Funcref optionally binds a Dictionary and/or arguments.  This is also called
a Partial.  This is created by passing the Dictionary and/or arguments to
function() or funcref().  When calling the function the Dictionary and/or
arguments will be passed to the function.

To which concept does the term Partial refer?

I had some ideas, but I don't know which one, if any, is the right one:

  • maybe it's called a Partial, because it's partially a function (the one to which the funcref refers), and partially data (the list of arguments or the dictionary, which are bound to the funcref)

  • the data are partially linked to the function; maybe we could bind them to another function

  • the list of arguments that the partial binds could be only a subset of the arguments used by the function to which the funcref refers; therefore, they're only a part of its arguments

2
  • 1
    Sounds like Partial application. – Wouter Donders Jun 29 '17 at 12:25
  • @WouterDonders Thank you very much. I think you're right. The concept described in this link seems to be very similar to the Partial from Vim's help. If you post it as an answer, I'll accept it. – user547381 Jun 29 '17 at 12:43
3

It sounds like the help file is referring to the concept of partial application, which is described in Wikipedia as:

"[...] the process of fixing a number of arguments to a function, producing another function of smaller arity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.