On Nov 13, 3:25 pm, furtive.cl... / gmail.com wrote:
> Ara,
>
> I have not had such problems with exception traces.  Emacs parses the
> trace, so I've never had a problem tracking exceptions down.
>
> You said you disagreed about variable names, but I didn't make an
> argument about variable names.  The argument was about needless
> temporaries lying around and mucking up at-a-glance comprehension.
> Those temporaries can be culled away nicely with Object#as.
>
>    expanded = stems.map { |stem|
>       "#{ stem }.#{ guess_extension stem }"
>    }.as { |guesses|
>       transform2(source_files + transform1(guesses))
>    }.as { |basenames|
>       basenames.map { |basename|
>          File.join dir, basename
>       }
>    }

what the heck is wrong with

   guesses   = stems.map { |stem| "#{ stem }.#{ guess_extension
stem }" }
   basenames = transform2(source_files + transform1(guesses))
   expanded  = basenames.map { |basename| File.join dir, basename }

or if you prefer

   expanded = (
     guesses   = stems.map { |stem| "#{ stem }.#{ guess_extension
stem }" }
     basenames = transform2(source_files + transform1(guesses))
     basenames.map { |basename| File.join dir, basename }
   )

T.