On Jan 25, 2010, at 2:24 PM, Glen Holcomb wrote:
> 
> I'll play around with your solution.  I have the following:
> 
> data = Hash.new { |l, k| l[k] = Hash.new { |l, k| l[k] = Hash.new { |l, k|
> l[k] = Hash.new([]) }}}

I'm assuming you want 'infinite' depth.  Consider:

default = lambda { |h,k| h[k] = Hash.new(&default) }
top = Hash.new(&default)

Gary Wright