Implementation of functional programming languages

Lieferzeit: Lieferbar innerhalb 14 Tagen

15,35 

ISBN: 1233158104
ISBN 13: 9781233158102
Herausgeber: Source: Wikipedia
Verlag: Books LLC, Reference Series
Umfang: 26 S.
Erscheinungsdatum: 25.06.2014
Auflage: 1/2014
Format: 0.2 x 24.6 x 18.9
Gewicht: 74 g
Produktform: Kartoniert
Einband: Kartoniert
Artikelnummer: 6924817 Kategorie:

Beschreibung

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

Herstellerkennzeichnung:


BoD - Books on Demand
In de Tarpen 42
22848 Norderstedt
DE

E-Mail: info@bod.de

Das könnte Ihnen auch gefallen …