In many cases, processing your sequential data will follow a similar pattern:
Figure out what question you’re trying to ask. This step is often the most difficult, as it sits in the problem or business domains. Once you have a clear question, Clojure provides the tools to process the data you have into an answer. That’s the next three steps.
Filter the data to remove unneeded elements.
Transform the elements into the desired form.
Reduce the transformed elements to the answer.
Let’s set the stage using a shopping cart example. In an online store, you have a catalog—a list of items for sale. These items are divided into departments. Customers place them in their carts, then check out. This process creates a billing record. ...