This file contains 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
class Array | |
=begin | |
Extends enumerable to add method frank_flatten | |
frank_flatten goes through each element of an array, checks if element at index is an array | |
if it is an array calls flatten on it to pull out each element in that array and return the | |
flattened array. | |
=end | |
def frank_flatten | |
if empty? | |
self |