- Anglický jazyk
Implementation of functional programming languages
Autor: Source: Wikipedia
Source: Wikipedia. Pages: 25. Chapters: Administrative normal form, Categorical abstract machine, Closure (computer science), Continuation-passing style, Deforestation (computer science), Defunctionalization, Functional compiler, Graph reduction, Hash consing,... Viac o knihe
Na objednávku, dodanie 2-4 týždne
14.22 €
bežná cena: 15.80 €
O knihe
Source: Wikipedia. Pages: 25. Chapters: Administrative normal form, Categorical abstract machine, Closure (computer science), Continuation-passing style, Deforestation (computer science), Defunctionalization, Functional compiler, Graph reduction, Hash consing, Lambda lifting, Lazy evaluation, Partial application, SECD machine, Strictness analysis, Supercombinator, Syntactic closure, Tail call, Thunk (functional programming). Excerpt: In computer science, a closure (also lexical closure or function closure) is a function or reference to a function together with a referencing environment-a table storing a reference to each of the non-local variables (also called free variables) of that function. A closure-unlike a plain function pointer-allows a function to access those non-local variables even when invoked outside of its immediate lexical scope. The concept of closures was developed in the 1960s and was first fully implemented in 1975 as a language feature in the Scheme programming language to support lexically scoped first-class functions. The explicit use of closures is associated with functional programming languages such as Lisp and ML, as traditional imperative languages such as Algol, C and Pascal did not support returning nested functions as results of higher-order functions and thus did not require supporting closures either. Many modern garbage-collected imperative languages support closures, such as Smalltalk (the first object-oriented language to do so) and C#. Support for closures in Java is planned for Java 8. The following fragment of Python 3 code defines a function counter with a local variable x and a nested function increment. This nested function increment has access to x, which from its point of view is a non-local variable. The function counter returns a closure containing a reference to the function increment, which increments non-local variable x. The closure returned by counter can be assigned to a variable: Invoking increment through the closures will give the following results: Peter J. Landin defined the term closure in 1964 as having an environment part and a control part as used by his SECD machine for evaluating expressions. Joel Moses credits Landin with introducing the term closure to refer to a lambda expression whose open bindings (free variables) have been closed by (or bound in) the lexical environment, resulting in a closed expression, or closure. This usage w
- Vydavateľstvo: Books LLC, Reference Series
- Rok vydania: 2014
- Formát: Paperback
- Rozmer: 246 x 189 mm
- Jazyk: Anglický jazyk
- ISBN: 9781233158102