This commit is contained in:
Miloslav Ciz 2022-04-26 21:52:29 +02:00
parent 5419eb0b62
commit 617f178d0c
9 changed files with 56 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# Lambda Calculus
Lambda calculus is a formal [mathematical](math.md) system for describing calculations with [functions](function.md). It is a theoretical basis for [functional languages](functional.md). It can be seen as a model of computation similar to e.g. a [Turing machine](turing_machine.md) -- in fact lambda calculus has exactly the same computational power as a Turing machine and so it is an alternative to it. It can also be seen as a simple [programming language](programming_language.md), however its so extremely simple it isn't used for practical programming, it is more of a mathematical tool for constructing proofs etc.
Lambda calculus is a formal [mathematical](math.md) system for describing calculations with [functions](function.md). It is a theoretical basis for [functional languages](functional.md). It can be seen as a model of computation similar to e.g. a [Turing machine](turing_machine.md) -- in fact lambda calculus has exactly the same computational power as a Turing machine and so it is an alternative to it. It can also be seen as a simple [programming language](programming_language.md), however its so extremely simple it isn't used for practical programming, it is more of a mathematical tool for constructing proofs etc. Nevertheless, anything that can be programmed in any classic programming language can in theory be also programmed in lambda calculus.
While Turing machines use memory in which computations are performed, lambda calculus performs computations only with pure mathematical functions, i.e. there are no [global variables](variable.md) or [side effects](side_effect.md). It has to be stressed that the functions in questions are mathematical functions, also called **pure functions**, NOT functions we know from programming. A pure function cannot have any side effects such as changing global state and its result also cannot depend on any global state or randomness, the only thing a pure function can do is return a value, and this value has to always be the same if the arguments to the function are same.