# Apply

In

mathematics andcomputer science ,**Apply**is a function that applies functions to arguments. It is a central concept inprogramming language s derived fromlambda calculus , such asLISP and Scheme, and also infunctional language s. In particular, it has a role in the study of thedenotational semantics of computer programs, by virtue of the fact that it is a continuous function oncomplete partial order s.In

category theory ,**Apply**is important inCartesian closed categories , (and thus, also inTopos theory ), where it is auniversal morphism ,right adjoint tocurrying .**Programming**In computer programing,

**apply**applies a function to a list of arguments. "Eval " and "apply" are the two interdependent components of the "eval-apply cycle", which is the essence of evaluating Lisp, described in SICP. [*[*]*http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html The Metacircular Evaluator*] (SICP Section 4.1)**Apply function**Apply is also the name of a special function in many languages, which takes a function and a list, and uses the list as the function's own argument list, as if the function was called with the elements of the list as the arguments. This is important in languages with

variadic function s, because this is the only way to call a function with an indeterminate (at compile time) number of arguments.In

Common Lisp **apply**is a function that applies a function to a list of arguments (note here that "+" is a variadic function that takes any number of arguments):**Universal property**Consider a function $g:X\; imes\; Y\; o\; Z$, that is, $gisin\; [X\; imes\; Y\; o\; Z]$ where the bracket notation $[A\; o\; B]$ denotes the

space of functions from "A" to "B". By means ofcurrying , there is a unique function $mbox\{curry\}(g)\; :X\; o\; [Y\; o\; Z]$. Then**Apply**provides theuniversal morphism :$mbox\{Apply\}:\; [Y\; o\; Z]\; imes\; Y\; o\; Z$,

so that

:$mbox\; \{Apply\}(f,y)=f(y)$

or, equivalently one has the

commuting diagram :$mbox\{Apply\}\; circ\; left(\; mbox\{curry\}(g)\; imes\; mbox\{id\}\_Y\; ight)\; =\; g$

The notation $[A\; o\; B]$ for the space of functions from "A" to "B" occurs more commonly in computer science. In

category theory , however, $[A\; o\; B]$ is known as theexponential object , and is written as $B^A$. There are other common notational differences as well; for example "Apply" is often called "Eval" [*Saunders Mac Lane, "Category Theory"*] , even though in computer science, these are not the same thing, witheval distinguished from "Apply", as being the evaluation of the quoted string form of a function with its arguments, rather than the application of a function to some arguments.Also, in category theory, "curry" is commonly denoted by $lambda$, so that $lambda\; g$ is written for "curry"("g"). This notation is in conflict with the use of $lambda$ in

lambda calculus , where lambda is used to denote free variables. With all of these notational changes accounted for, the adjointness of "Apply" and "curry" is then expressed in the commuting diagramThe articles on

exponential object andCartesian closed category provide a more precise discussion of the category-theoretic formulation of this idea. Thus use of lambda here is not accidental; Cartesian close categories provide the general, natural setting for lambda calculus.**Topological properties**In

order theory , in the category ofcomplete partial order s endowed with theScott topology , both "curry" and "apply" arecontinuous function s (that is, they areScott continuous ). [*H.P. Barendregt, "The Lambda Calculus", (1984) North-Holland ISBN 0-444-87508-5*] This property helps establish the foundational validity of the study of thedenotational semantics of computer programs.**References**

*Wikimedia Foundation.
2010.*

**Synonyms**:

### Look at other dictionaries:

**apply**— ap‧ply [əˈplaɪ] verb applied PTandPP 1. [intransitive] to make a formal, usually written, request for something, especially a job, a place at university, or permission to do something: apply for • She had applied for a full time job as an English … Financial and business terms**Apply**— Ap*ply , v. t. [imp. & p. p. {Applied}; p. pr. & vb. n. {Applying}.] [OF. aplier, F. appliquer, fr. L. applicare to join, fix, or attach to; ad + plicare to fold, to twist together. See {Applicant}, {Ply}.] 1. To lay or place; to put or adjust… … The Collaborative International Dictionary of English**apply**— [v1] put into use administer, assign, bring into play, bring to bear, employ, engage, execute, exercise, exploit, handle, implement, practice, utilize; concept 225 apply [v2] be appropriate, relevant affect, allude, appertain, be applicable, bear … New thesaurus**apply**— [ə plī′] vt. applied, applying [ME applien < OFr aplier < L applicare, to attach to < ad , to + plicare, to fold: see PLY1] 1. to put on or spread on; place so as to be touching [to apply a salve to the skin] 2. to put to some practical… … English World dictionary**Apply**— Ap*ply , v. i. 1. To suit; to agree; to have some connection, agreement, or analogy; as, this argument applies well to the case. [1913 Webster] 2. To make request; to have recourse with a view to gain something; to make application. (to); to… … The Collaborative International Dictionary of English**apply**— I (pertain) verb affect, be applicable, be concerned with, be connected with, be pertinent, be proper to, be relevant, bear upon, belong to, concern, deal with, have a connection to, have bearing on, have reference, have relation, involve,… … Law dictionary**apply**— (v.) late 14c., to put (one s faculties, etc.) to some task or career, late 14c., from O.Fr. aploiier (12c., Mod.Fr. appliquer) apply, use, attach, from L. applicare attach to, join, connect; figuratively, devote (oneself) to, give attention,… … Etymology dictionary**apply**— ► VERB (applies, applied) 1) make a formal request for something to be done, such as asking to be considered for a job. 2) bring into operation or use. 3) be relevant. 4) put (a substance) on a surface. 5) (apply oneself) put all one s … English terms dictionary**apply to**— index appertain, call (appeal to), importune, petition, pray Burton s Legal Thesaurus. William C. Burton. 2006 … Law dictionary**apply**— 1 *use, employ, utilize, avail 2 devote, *direct, address Analogous words: attend, mind, *tend: addict, accustom, *habituate: toil, labor, work, grind (see corresponding nouns at WORK) Contrasted … New Dictionary of Synonyms**apply**— v. 1) (D; intr.) ( to request ) to apply for; to (we applied to the authorities for assistance; the captain applied to headquarters for a transfer; she applied for a fellowship) 2) (D; intr.) ( to seek admission to ) to apply to (she applied to… … Combinatory dictionary