O'Reilly logo

Clojure for Finance by Timothy Washington

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Strategies for Using Macros

The previous chapter saw us saving the data we read and analyzed. This gave us the chance to develop a persistence strategy which writes our data in the EDN format and uses a component pattern. Let's now turn our attention to reading this data and seeing how far we can go while searching for it. In this chapter, we'll roughly cover the following topics:

  • Simple reading
  • An example of a regular expression
  • Querying and looking up data
  • A simple query language
  • Variable argument functions
  • The :pre and :post function conditions
  • The juxt higher order function
  • Separating the OR/AND lookups
  • Deriving a small query language using macros

Simple reading

Reading in EDN (or any other) files follows the same pattern as writing. This ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required