------ art_63265_4846323.1171283029657
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 2/12/07, James Edward Gray II <james / grayproductions.net> wrote:
>
>
> When I built the quiz, I used the following solutions to reality-
> check myself. (Making sure I could find a viable answer.)
> <snip>
>
quiz.inject(Array.new) { |arr, a| arr.push(*a) }
> <snip>
> #
> # Convert an Array of objects to nested Hashes such that %w[one two
> three four
> # five] becomes {"one" {"two" {"three" {"four" "five"}}}}.
> #
> quiz.reverse.inject { |res, wrap| {wrap res} }
>
> James Edward Gray II
Applying your genius to your genius we get
for the flat_flatten problem
quiz.inject{|arr,ele| [*arr].push(*ele)}
maybe you prefer your original solution but I feel the second one is just
great too.
Cheers
Robert
--
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important
things.
-Anonymous
------ art_63265_4846323.1171283029657--