Minor nitpick: here we reference @partitions and on line 74, 75, and 76 we reference partitions.    I believe they're all referring to the same thing but here we access the instance variable directly whereas, the latter lines use the memoized partitions method.  We should be consistent.