Function composition (computer science)

Charles Babbage, sometimes referred to as the "father of computing".

Act or mechanism to combine simple functions to build more complicated ones.

- Function composition (computer science)

26 related topics


Stream (computing)

Sequence of data elements made available over time.

The standard streams for input, output, and error

Functions that operate on a stream, producing another stream, are known as filters, and can be connected in pipelines, analogously to function composition.

Pipeline (software)

Input of the next; the name is by analogy to a physical pipeline.

The InSight lander with solar panels deployed in a cleanroom

Connecting elements into a pipeline is analogous to function composition.

Higher-order function

In the untyped lambda calculus, all functions are higher-order; in a typed lambda calculus, from which most functional programming languages are derived, higher-order functions that take one function as argument are values with types of the form.

Hilbert in 1912

Function composition

Fold (higher-order function)

In functional programming, fold (also termed reduce, accumulate, aggregate, compress, or inject) refers to a family of higher-order functions that analyze a recursive data structure and through use of a given combining operation, recombine the results of recursively processing its constituent parts, building up a return value.

where the period (.) is an operator denoting function composition.


Widely believed that composable systems are more trustworthy than non-composable systems because it is easier to evaluate their individual parts.

While most aspects of computer security involve digital measures such as electronic passwords and encryption, physical security measures such as metal locks are still used to prevent unauthorized tampering.

Function composition

Function type

Type of a variable or parameter to which a function has or can be assigned, or an argument or result type of a higher-order function taking or returning a function.

Charles Babbage, sometimes referred to as the "father of computing".

The syntax used for function types in several programming languages can be summarized, including an example type signature for the higher-order function composition function:

Declarative programming

Programming paradigm—a style of building the structure and elements of computer programs—that expresses the logic of a computation without describing its control flow.

Charles Babbage, sometimes referred to as the "father of computing".

Instead, computations are characterised by various kinds of recursive higher-order function application and composition, with explicit references to I/O and data appearing sparingly, and state mutation avoided or encapsulated wherever possible.

F Sharp (programming language)

Functional-first, general purpose, strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods.

Like other functional programming languages, F# allows function composition (computer science) using the and operators.

Lock (computer science)

Synchronization primitive: a mechanism that enforces limits on access to a resource when there are many threads of execution.

Charles Babbage, sometimes referred to as the "father of computing".

One of lock-based programming's biggest problems is that "locks don't compose": it is hard to combine small, correct lock-based modules into equally correct larger programs without modifying the modules or at least knowing about their internals.

Linear probing

Scheme in computer programming for resolving collisions in hash tables, data structures for maintaining a collection of key–value pairs and looking up the value associated with a given key.

The collision between John Smith and Sandra Dee (both hashing to cell 873) is resolved by placing Sandra Dee at the next free location, cell 874.
When a key–value pair is deleted, it may be necessary to move another pair backwards into its cell, to prevent searches for the moved key from finding an empty cell.

To handle strings or other types of variable-length keys, it is possible to compose a simpler universal hashing technique that maps the keys to intermediate values and a higher quality (5-independent or tabulation) hash function that maps the intermediate values to hash table indices.