Flowdock
flatten!() public

Flattens self in place. Returns nil if no modifications were made (i.e., array contains no subarrays.)

   a = [ 1, 2, [3, [4, 5] ] ]
   a.flatten!   #=> [1, 2, 3, 4, 5]
   a.flatten!   #=> nil
   a            #=> [1, 2, 3, 4, 5]
Show source
Register or log in to add new notes.