ABSTRACT

T captures the model of a factory pipeline, whereeach station, or box, does one specific task over data that flows through it. In its purest form, the pipeline style is a faithful reflection of the theory of mathematical functions, where small boxes, aka functions, take input and produce output. In mathematics, a function is a relation that maps a set of inputs in one domain to a set of outputs in the same or another domain, where each input relates to exactly one output; for example f(x) = x2 is a function that maps real numbers to non-negative real numbers such that when a value x is presented as input, the value x2 is given as output. Like in a factory pipeline, functions can be composed with each other using mathematical function composition f ◦ g (“f after g”), as long as the output domain of the second function, g, is the same as, or is contained in, the input domain of the first, f . The input and output to functions can be anything, including other functions (boxes that do things themselves); functions that take functions as input or produce functions are called higher-order functions.