The Interceptor pattern was originally introduced by Pedestal, but has since been adopted by several other projects in the Clojure world. It’s an extremely useful design tools to be familiar with, and while they may seem a bit strange at first, Interceptors are suprisingly straightforward.
This episode introduces the interceptor concept, including the context map, queue, and stack. Clojure’s persistent queues are explored, and to round off we look at how interceptors deal with error handling.
With the basics of multimethods out of the way it’s time to look at some of the
more advanced uses. This episodes explores in depth Clojure’s keyword hierarchy
features, some little known aspects of the
type functions, and
closes off with some examples that demonstrate the flexibility Clojure provides
when modeling data and behavior.
Clojure provides polymorphism through protocols and multimethods. Protocols were covered in depth in episode 24. This episode provides a brief recap, then looks at multimethod basics. If you are already familiar with multimethods then you might want to skip to the second part, which covers some of lesser known aspects.
After some exploration and analysis of the data it’s time to create a predictive model. In this episode you’ll discover several new chart types, learn how to evaluate the correlation between variables, how to create a simple linear model, and how to evaluate the fitness of the model.