run builds a larger function by connecting smaller functions in sequence. The result from one function becomes the input to the next, making behavior easier to reuse and extend. section 1.2
Compose a message printer
var printMessage = run(addToDom('msg'), h1, echo); printMessage('Hello World');. Each function contributes one step: create the target operation, format the heading, and supply the message. section 1.2
Listing 1.1. Functional printMessage
var printMessage = run(addToDom('msg'), h1, echo);
printMessage('Hello World');
Inspect the complete composed printMessage definition and its single-message invocation. section 1.2
The same pattern can extend a workflow without rewriting its pieces: run(console.log, repeat(2), h2, echo) adds logging, repetition, formatting, and output as separate functions. section 1.2
