build flatten without using Array#flatten example: [[1,2,[3]],4] to [1,2,3,4]
Run following command to test the functioning of the extension method on Array rspec ./flatten_spec.rb --format documentation
As commented as well in the code, i used the most basic methods i can think of to avoid #each, #flatten and others and make it as plain ruby as possible. Basically what we do is making an recursive loop, to make an infinitly deeply nested array even flattable, it would be the developers responsibility to use this carefully as for sure it's not the optimal way to work with to large array's as this would require memory usage and speed usage testing.