Functional code needs an alternative to procedural control flow such as loops and conditionals. The seq combinator runs several functions in order against the same input, coordinating their actions without adding variables or business logic. section 4.6
A small JavaScript implementation collects its function arguments, then calls each function with the supplied value. This makes seq useful when several operations—such as displaying information and logging it—should happen in order rather than form a value-transforming pipeline. section 4.6
Showing and logging a student
After finding and formatting a student, compose can pass the result to seq, which calls append('#student-info') and consoleLog in order. The functional version replaces the repeated procedural control flow with a reusable combinator. section 4.6
identity :: (a) -> a
The related listings show seq's implementation and its use inside a composed showStudent function. section 4.6
