Summary

When refactoring the generate-prices function, we took a step back and considered some useful math equations that could help us generate a list of prices. Indeed, the central moral of Clojure is that it should be a building material or simply the building blocks we use when engineering our systems. We were able to confidently combine results from polynomial and sine equations to our pre-existing stochastic oscillating function.

For the new functions, we were able to vary the vertical dilation, horizontal dilation, and granularity of the samples we took. We were also able to combine these results within a beta probability distribution that we configured to our needs. Much of the work was this kind of math-based consideration. Fleshing out the overall approach of Clojure's functions around recursion, list comprehensions, conditional dispatch, and first order functions then enabled us to traverse and manipulate our data until we got what we wanted.

Dwelling on the different approaches of reduce, iterate, for, and partition provided us with a better intuition on how Clojure approaches list transformation. We've only touched on the functionality available for data and program transformations. In the next chapter, we'll step back and review all of Clojure's features together.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.18.198