Shopify/batman — pull request #605 by kristianpd (2012-12-04 02:47:48+00:00)
Title: Memoize ancestors

This refactors the `_batman.ancestors` function to memoize all parents for the more common case of retrieving all accessor and iterating over them. This still keeps the same interface for reducing a set of `ancestors` based on a provided function but will use the memoized value if present to avoid recursing through all parents every time.

![](http://cl.ly/image/0k0V3N28281O/Screen%20Shot%202012-12-03%20at%209.43.07%20PM.png)

@cjoudrey @hornairs @nciagra for review please