This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The goal of this code is to compress nested Arrays into a single Array, just as the .flatten method. | |
| class Array | |
| #this method will make it possible to use my own array flattening method in Ruby by saving this method to the Array class. | |
| def make_it_flat(g = nil) | |
| g ? flatten_all(self, g) : flat_anyway(self) | |
| #checking if g has value or not |