What is Functional: Definition and 414 Discussions

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.
In functional programming, functions are treated as first-class citizens, meaning that they can be bound to names (including local identifiers), passed as arguments, and returned from other functions, just as any other data type can. This allows programs to be written in a declarative and composable style, where small functions are combined in a modular manner.
Functional programming is sometimes treated as synonymous with purely functional programming, a subset of functional programming which treats all functions as deterministic mathematical functions, or pure functions. When a pure function is called with some given arguments, it will always return the same result, and cannot be affected by any mutable state or other side effects. This is in contrast with impure procedures, common in imperative programming, which can have side effects (such as modifying the program's state or taking input from a user). Proponents of purely functional programming claim that by restricting side effects, programs can have fewer bugs, be easier to debug and test, and be more suited to formal verification.Functional programming has its roots in academia, evolving from the lambda calculus, a formal system of computation based only on functions. Functional programming has historically been less popular than imperative programming, but many functional languages are seeing use today in industry and education, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, Elixir, OCaml, Haskell, and F#. Functional programming is also key to some languages that have found success in specific domains, like JavaScript in the Web, R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML. Domain-specific declarative languages like SQL and Lex/Yacc use some elements of functional programming, such as not allowing mutable values. In addition, many other programming languages support programming in a functional style or have implemented features from functional programming, such as C++11, Kotlin, Perl, PHP, Python, Go, Rust, Raku, Scala, and Java (since Java 8).

View More On Wikipedia.org
  1. P

    Functional Analysis: Proving Closure of Finite Sets in Metric Spaces

    Hello I need help with an analysis proof and I was hoping someone might help me with it. The question is: Let (X,d) be a metric space and say A is a subset of X. If x is an accumulation point of A, prove that every r-neighbourhood of x actually contains an infinite number of distinct...
  2. P

    Prove Open & Closed Sets in C[0,1] | Functional Analysis

    Hello Would anyone out there be able to help me with a problem I'm having? I have to prove that a function is open and that another is closed. The question is: Consider C [0,1] with the sup metric. Let f:[0,1]→R be the function given by f(x)=x²+2 Let A={g Є C[0,1]: d(g,f) > 3}. Prove...
  3. P

    Proving Open/Closed Sets: Functional Analysis in C [0,1]

    Hello Would anyone out there be able to help me with a problem I'm having? I have to prove that a function is open and that another is closed. The question is: Consider C [0,1] with the sup metric. Let f:[0,1]→R be the function given by f(x)=x²+2 Let A={g Є C[0,1]: d(g,f) > 3}. Prove...
  4. P

    Is the Functional C_n on Polynomials with Supremum Norm Discontinuous?

    Homework Statement I have to show that the functional C_n on the space of polynomials on the interval [0,1], that takes the n'th coefficient ie C_n\left( \sum_{j=0}^m a_j t^j \right) = a_n is discontinuous with respect to the supremum norm \|p\|_{\infty} = \sup_{t\in[0,1]}|p(t)| ...
  5. malawi_glenn

    Functional analysis, and Quantum Mechanics

    Hi! I was thinking about taking an introductory course in Functional analysis the commming spring, and was wondering if you more experienced guys can tell me if this is a good complement to understand theoretical quantum physics better? Cheers
  6. S

    Another functional analysis question

    first of all how do you write in latex
  7. S

    Functional determinant approach to perturbation

    given the functional integral with 'g' small coupling constant \int \mathcal D [\phi]exp(iS_{0}[\phi]+\int d^{4}x \phi ^{k}) so k >2 then could we use a similar 'Functional determinant approach' to this Feynman integral ?? in the sense that the integral above will be equal to...
  8. J

    Klein-Gordon Field QM: Replacing Wave Function with Wave Functional?

    Is it correct to think, that with a scalar complex Klein-Gordon field the wave function \Psi:\mathbb{R}^3\to\mathbb{C} of one particle QM is replaced with an analogous wave functional \Psi:\mathbb{C}^{\mathbb{R}^3}\to\mathbb{C}? Most of the introduction to the QFT don't explain anything like...
  9. K

    Evaluating Functional integrals

    HOw can you compute a Gaussian functional integral? i mean integral of the type e^{-iS_{0}[\phi]+i(J,\phi)} if J=0 then i believe that we can describe the Functional integral as \frac{c}{(Det(a\partial +b)} a,b,c constant so Det(a\partial +b)}= exp^{-\zeta '(0)} \zeta (s) =...
  10. K

    Understanding Functional Determinants in Mathematics

    I say what is a functional determinant ?? for example Det( \partial ^{2} + m) is this some kind of Functional determinant? then i also believe (althouhg it diverges ) that Det( \partial ^{2} + m)= \lambda_{1}\lambda_{2}\lambda_{3}\lambda_{4}... (the determinant of a Matrix is the...
  11. R

    AP Biology: All 6 Functional Groups

    I was studying my brother's old notes to prepare me for my upcoming AP Biology class. I read over six main functional groups (hydroxyl, carbonyl, carboxyl, amino, sulfhydrl, phosphate) and subsequently, there were follow-up questions. One of them asked to draw a molecule with all of the six...
  12. A

    Understanding Functional Spaces in Mathematics

    I've been looking for some decent info on functional space but could not find anything. Googling gives lots of defenitions, but no explanations as such. Basically I'd like to understand why a function can be decomposed into other function, e.g. understand a meaning of inner product with...
  13. K

    Defining the Product of Linear Functionals: Is It Possible?

    Let be a set of LInear functionals U_{n}[f] n=1,2,3,4,... so for every n U_{n}[\lambda f+ \mu g]=\lambda U_{n}[f]+\mu U[g] (linearity) the question is if we can define the product of 2 linear functionals so U_{i}U_{j}[f] makes sense.
  14. P

    Generalizing Functional Integration for Piecewise-Smooth Manifolds

    I'm intrigued by the fact that apparently no general theory of functional integration has been developed - something along the lines of Riemann, Cauchy, and Lebesgue. Feynman developed an approach to evaluating functional integrals for paths in spacetime - but I'm wondering whether it is...
  15. E

    What is Functional Derivation and How is it Used to Solve Complex Problems?

    I have a problem with this simple (?) derivation u(f(t),t) = \frac{\partial }{\partial f(t)} \int_0^T \ g(f(t),f(t'),t,t') \ dt'
  16. C

    Functional derivative: chain rule

    Hmm, I've been working with functional derivatives lately, and some things aren't particularly clear. I took the definition Wikipedia gives, but since I know little of distribution theory I don't fully get it all (I just read the bracket thing as a function inner product :)). Anyway, I tried...
  17. D

    What are the conditions for cubic convergence in functional iteration?

    Homework Statement Consider an iteration function of the form F(x) = x + f(x)g(x), where f(r) = 0 and f'(r) != 0. Find the precise conditions on the function g so that the method of functional iteration will converge cubically to r if started near r. Homework Equations I really don't know...
  18. V

    Finding Functional Group Names for Orgo II Exam Prep

    I need to study all of these names for my orgo II exam next week. Can someone help me to find the general trend or functional group name for the following attached compounds? I have tried some of them let me know if I made any mistake on these two sheets. ie. #1 gem-diol (hydrate)...
  19. T

    Functional integral (semiclassic formula)

    If to calculate the propagator K(x,x') (vaccuum)for a theory so: (i\hbar \frac{\partial}{\partial t}\Psi - H\Psi )K(x,x')=\delta (x-x') (1) we use the functional integral approach: K(x,x')=<0|e^{iS[x]/\hbar }|0> my question is, let's suppose we use the semiclassical WKB approach...
  20. J

    Linear functional equivalence in vsp and subsp

    I am writing a solution for the following problem, I hope someone can correct it, because I am not sure what I am missing. Q. V is a finite dim. vsp over K, and W is a subspace of V. Let f be a linear functional on W. Show that there exists a linear functional g on V s. t. g(w)=f(w). Ans...
  21. S

    Question on Dirac Delta and functional derivatives

    Suppose that we have a compact manifold \mathcal{M} with a positive definite metric g_{ij}. The volume of the manifold is then V = \int_\mathcal{M} d^3x \sqrt{g(x)}, where x^i are coordinates on \mathcal{M} and \sqrt{g(x)} is the square root of the determinant of the metric. Suppose now that...
  22. S

    Does a Chain Rule Exist for Functional Derivatives?

    Does there exist a chain rule for functional derivatives? For example, in ordinary univariate calculus, if we have some function y=y(x) then the chain rule tells us (loosely) that \frac{d}{dy} = \frac{dx}{dy}\frac{d}{dx}. Now suppose that we have a functional F[f;x) of some function...
  23. C

    General theorem for Functional dependence

    suppose Fi (a1, a2, ... an) , 0 < i <= k. a1, ..., an are reals Then the Frechet derivative DF is a k x n matrix. If rank(DF) = k , does it still suggest functional dependence amonst Fi 's ? Also, when rank(DF) < n (number of independent variables) , what does it signify ? The theorem I had...
  24. M

    What Is a Functional and How Can It Be Plotted?

    So far all I know is that a functional is a function that has a set of functions as its domain. So what does that mean? I have a functional that looks like dy/dx = a bunch of constants. What I'd like to know is how to take that and plot it. Can this be done?
  25. MathematicalPhysicist

    Finding a functional connection.

    im given: u=arcsin(x)+arccos(y) v=xsqrt(1-y^2)+ysqrt(1-x^2) and i need to find the functional connection between u and v. i know that: v'_x/u'_x=dv/du and i have got: dv/du=sqrt(1-x^2)sqrt(1-y^2)-xy now i need to show the rhs as a function of v or u, obviously of v should be much...
  26. D

    Find the first derivative of this functional

    Homework Statement For f\in C([0,1]), let N(f)=\int_0^1(f(t))^2dt. Show that N\in C^{\infty} and calculate the first derivative.Homework Equations Can I use Leibniz's integral rule for this?The Attempt at a Solution If I just blindly plug in the formula, I get dN/df=\int_0^12f(t)dt
  27. B

    Functional Analysis for Derivatives Trading: Is it Beneficial?

    I am thinking about taking a class on functional analysis. I am eventually planning on doing derivatives trading as a career. Is this class worth taking or should I try to find something more applied. I guess I am saying that I don't see how applied functional analysis is.
  28. S

    Where can I find a good account of functional methods in QFT?

    I'd like to be as familiar with functional methods as with calculus. Otherwise I always fell not to grasp QFT comprehensively. Any help is much appreciated!
  29. G

    Density functional theory, and Kohn Sham equations

    Hi, i am looking for papers, books, etc, related with the Density functional theory, and Kohn Sham equations, i appreciate any help. Thanks. :rolleyes:
  30. 0

    Functional programming multi-threading

    Strangely a good introductory internet resource on this subject doesn't seem to be readily available. Where can I look for information on this subject? --I am mainly interested in the concepts behind functional multi-threading rather than the syntax for any specific language.
  31. J

    Path integral over probability functional

    Hi. Can anyone tell me how to solve the path integral \int D F \exp \left\{ - \frac{1}{2} \int_{t'}^{t} d \tau \int_{t'}^{\tau} ds F(\tau) A^{-1}(\tau - s) F(s) + i \int_{t'}^{t} d\tau F(\tau) \xi(\tau) \right\} In case my Latex doesn't work the integral is over all possible forces F over...
  32. Oxymoron

    The Continuous Functional Calculus

    Although this problem is meant to be easy I can't quite work it out. Let U(A) denote the set of unitary elements of a C*-algebra A. I've already shown that if u is unitary in A then the spectrum of u: \sigma(u) \subset \mathbb{T} = \{z\in\mathbb{C}\,:\,|z|=1\} which was easy. Now...
  33. D

    Linear Functional Operations in Vector Spaces and Fields

    A linear functional is a function g:V to F where V is a vector space over a field F such that if u and v are elements of V and a is an element of F, then g(u+v) = g(u) + g(v) and g(au) = ag(u) Let G be the space of all linear functionals on V. Then if \oplus_{1} and \otimes_{1} are...
  34. Oxymoron

    Functional Analysis question

    I have a commutative Banach algebra A with identity 1. If A contains an element e such that e^2 = e and e is neither 0 nor 1 (I think this also means to say that it contains a non-trivial idempotent), then the maximal ideal space of A is disconnected. Currently I am trying to show this but I...
  35. benorin

    Oddball Zeta functional equation: uh?

    I found this functional equation for the Riemann zeta function in Table of Higher Functions, 6th ed. by Jahnke, Emde, & Losch on pg. 40: z(z+1)\frac{\zeta (z+2)\zeta (1-z)}{\zeta (z)\zeta (-1-z)}=-4\pi ^2 any suggestions as to how one might consider such an equation, much less derive it...
  36. E

    Is There an Alternative Method to Obtain the Extremum of a Functional?

    Let,s suppose we have a functional J and we want to obtain its extremum to obtain certain Physical or Math properties: \delta{J[f(x)]}=0 Yes you will say to me " You can apply Euler-Lagrange Equation to it and generate a Diferential equation to obtain f"..of course is easier saying than...
  37. M

    What is the systematic name for the functional group in esters?

    The (main) functional group in esters are: R_1OOR_2 Where R_1 and R_2 are carbon chain. When I though about it, I've never heard the systematic name of this functional group. What is this functional group called? I've seen esterbonding etc. but that doesn't sound systematic as ex...
  38. C

    Functional equation f(x)=f(x^2)

    Hello everybody I'm given a continuous function f (from the real numbers to the real numbers) which I know obeys the following functional equation: f(x)=f(x^{2}) How can I proof that this function is constant? I started out like this: Looking at a number x in [0,1[ I said to myself that...
  39. K

    Functional independence and energy

    I put together two questions : a) suppose there is a point mass with mass M..if it is moving, then from a certain oberver, the total energy is higher, via E=Mc^2...hence, following the generaly relativity qualitatively, where the energy density defines the curvature, the gravitation should be...
  40. E

    Is this the Correct Solution for Functional Differential Equations?

    let be the next functional differential equation: \delta{F[\phi]}=G[\phi,\partial{\phi}] then its solution would be: F[\phi]=\int{D[\phi]G[\phi,\partial{\phi}] would it be correct?..thanks..
  41. X

    Expressing Barber Paradox in functional notation?

    Regarding the Barber of Seville paradox, I am looking for something equivalent that is expressed in functional notation. For example, this is my attempt at a piecewise definition of such a function: For a function f : \mathbb{N} \mapsto \{0,1\} f(n)=\left\{\begin{array}{cc}0,&\mbox{ if...
  42. E

    A trick to solve functional integraltion?

    we know that the functional integrals are important in quantum field theory,but we have the problem that except for the semiclassical approach,they can not be solved anyway..but if we used the formula:. \int{d[\phi]F[\phi]=\sum_{n=1}^{\infty}(-1)^{n}\phi^n{D^{n}F[\phi]} where D is the...
  43. R

    Vacuum to Vacuum Amplitudes and Functional Integrals

    Hi, I am reading chapter 5 of Ryder regarding path integrals and vacuum to vacuum transition amplitudes in presence of source. I follow the math but don't have a clear physical picture. The formula is: Z[J]=\int Dq \: exp ( \frac{i}{h}\int dt(L+hJq+\frac{1}{2}i\epsilon q^2) ) Can...
  44. Oxymoron

    Functional Analysis problems

    Im trying to prove the following proposition Let (X,\|\cdot\|_X) and (Y,\|\cdot\|_Y) be normed vector spaces and let T:X \rightarrow Y be a surjective linear map. Then T is an isomorphism if and only if there exist m,M > 0 such that m\|x\|_X \leq \|Tx\|_Y \leq M\|x\|_X \quad \forall \, x...
  45. C

    Functional variation of Lagrangian densities

    Why do we treat a scalar field phi and its derivatives as being independent when trying to find a stationary solution for the action? Doesn't that give too general solutions? Where does the restriction that (d_mu phi) is dependent on phi come back in?
  46. E

    Requirements of a functional

    what are the requirements of a functional J[y] to exist in the form that its minimum will yield to a differential equation?..i mean let be the functional with condition: J[y]=\int_{a}^{b}dx(p(x)(y`)^{2}+V(x)y^{2}) \int_{a}^{b}y^{2}dx=C with c a constant... then what conditions should...
  47. E

    KONWhat is the solution to the functional equation f(x,y)=g(r(x)+h(y))?

    let be the functional equation f(x,y)=g(r(x)+h(y)) my question is..does this equation have a solution?..thanks...
  48. Oxymoron

    Proving Properties of Adjoint Operators in Functional Analysis

    Im having some difficulties proving some basic properties of the adjoint operator. I want to prove the following things: 1) There exists a unique map T^*:K\rightarrow H 2) That T^* is bounded and linear. 3) That T:H\rightarrow K is isometric if and only if T^*T = I. 4) Deduce that if T is...
  49. Oxymoron

    Functional Analysis problems need checking

    Question 1 Prove that if (V, \|\cdot\|) is a normed vector space, then \left| \|x\| - \|y\| \right| \leq \|x-y\| for every x,y \in V. Then deduce that the norm is a continuous function from V to \mathbb{R}.
  50. S

    SUN Project Looking Glass: Amazing 3D Desktop

    I saw this video today and I believe it is a presentation from SUN's "Project Looking Glass". Now this is the desktop of my dreams! http://abum.com/files/Movies/3d_desktop.wmv http://www.sun.com/software/looking_glass/
Back
Top