#+title: functional application Functional application is the act of applying arguments to a [[file:20210521211721-function_programming.org][function]]. In programming this is usually distinct from simply calling a function. In a [[file:20200604222651-lisp.org][Lisp]], usually this means taking an actual list of arguments and calling a function with it: #+begin_src emacs-lisp (apply 'car '((1 2 3))) #+end_src #+RESULTS: : 1 Compare that with: #+begin_src emacs-lisp (car '(1 2 3)) #+end_src #+RESULTS: : 1 In the first instance, the outer list is supplying the list of arguments to =car=. In [[file:20200604222651-lisp.org][Lisp]], functional application is the cornerstone of a Lisp interpreter, where often in the source code a function's arguments are quite literally applied to it. Or, consider the following in [[file:20200720132835-javascript.org][JavaScript]]: #+begin_src js :results output const add = (x, y, z) => x + y + z; console.log(add.apply(null, [1, 2, 3])); #+end_src #+RESULTS: : 6