Update
This commit is contained in:
parent
312d1d830b
commit
df321dd3b1
5 changed files with 32 additions and 10 deletions
|
@ -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. Nevertheless, anything that can be programmed in any classic programming language can in theory be also programmed in lambda calculus.
|
||||
Lambda calculus is a formal [mathematical](math.md) system for describing computation with [functions](function.md). It is a theoretical basis for [functional languages](functional.md). It is a [model of computation](model_of_computation.md) 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. Lambda calculus can also be seen as a simple [programming language](programming_language.md), however it is so extremely simple that its pure form 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.
|
||||
|
||||
|
@ -46,4 +46,6 @@ Let's take a complete **example**. We'll use the above shown increment function
|
|||
(Lf.Lx.fx) B-reduction
|
||||
```
|
||||
|
||||
We see we've gotten the representation of number 1.
|
||||
We see we've gotten the representation of number 1.
|
||||
|
||||
TODO: C code
|
Loading…
Add table
Add a link
Reference in a new issue