What are the core concepts in functional programming?

后端 未结 6 823
一生所求
一生所求 2020-12-22 17:04

In object-oriented programming, we might say the core concepts are:

  1. encapsulation
  2. inheritance,
  3. polymorphism

What would that be

6条回答
  •  粉色の甜心
    2020-12-22 17:45

    In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state. Functional programming has its roots in the lambda calculus, a formal system developed in the 1930s to investigate function definition, function application, and recursion. Many functional programming languages can be viewed as embellishments to the lambda calculus. - Wikipedia

    In a nutshell,

    1. Lambda Calculus
    2. Higher Order Functions
    3. Immutability
    4. No side-effects

提交回复
热议问题