module Enumerable

instance methods

Enumerable#nest &compare

nest is an inverse for Array#flatten. (Well, actually only a right inverse since flatten is not injective.) You give it a proc that calculates the depth of each item, and it returns a nesting of arrays in which each item has the desired depth. It can be used to parse strings with Python-like indentation syntax, but it isn't limited to strings.


Enumerable tools 1.5

The current version of this software can be found at .


This software is distributed under the Ruby license. See


Joel VanderWerf,