Clojure: Testing The Creation Of A Partial Function

1 · Jay Fields · May 14, 2013, noon
I recently refactored some code that takes longs from two different sources to compute one value. The code originally stored the longs and called a function when all of the data arrived. The refactored version partials the data while it's incomplete and executes the partial'd function when all of the data is available. Below is a contrived example of what I'm taking about. Let's pretend we need a function that will allow us to check whether or not another drink would make us legally drunk in New...