Category:Theoretical Computer Science

Terms
Example in ECMAScript (JavaScript): // Return a list of all books with at least 'threshold' copies sold. function bestSellingBooks(threshold) { return bookList.filter(              function(book) { return book.sales >= threshold; }    ); }
 * Continuation:In computing, a continuation represents the rest of the computation given a point in the computation. Another word for "rest of the computation" is control state, meaning the data structures and code needed to complete a computation. Most languages implement the data structure as a variant of the stack and the code as just a pointer to the current instructions. There are also programming languages that represent the control data as a heap-allocated object.
 * Closure:In computer science, a closure is a function that is evaluated in an environment containing one or more bound variables. When called, the function can access these variables. Closures typically appear in languages where functions are first-class objects.
 * Coroutine:In computer science, coroutines are program components that generalize subroutines to allow multiple entry points and suspending and resuming of execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, iterators, infinite lists and pipes.
 * Subroutine:In computer science, a subroutine (function, method, procedure, or subprogram) is a portion of code within a larger program, which performs a specific task and can be relatively independent of the remaining code. The syntax of many programming languages includes support for creating self-contained subroutines, and for calling and returning from them.
 * Iterator:A statement block that yields an ordered sequence of values. In languages such as C#, iterators contain the keywords  or.
 * First-class object:In computing, a first-class object (also value, entity, and citizen), in the context of a particular programming language, is an entity which can be used in programs without restriction (when compared to other kinds of objects in the same language). Depending on the language, this can imply:
 * being expressible as an anonymous literal value
 * being storable in variables
 * being storable in data structures
 * having an intrinsic identity (independent of any given name)
 * being comparable for equality with other entities
 * being passable as a parameter to a procedure/function
 * being returnable as the result of a procedure/function
 * being constructible at runtime
 * being printable
 * being readable
 * being transmissible among distributed processes
 * being storable outside running processes