The idea of Object#tap is to insert a "listener" (like tapping a phone
line) into the object chain without affecting the object (without
being caught eavesdropping).

On the other hand, we often wish to transform the current object.  I
use Object#as like this: take the current object, name it *as*
something, do something with it, and give the result.

   class Object
      def as
         yield self
      end
   end

Compare:

   all_files2 = transform2(source_files + transform1(
      stems.map { |f|
         f + "." + guess_extension(f)
      })).map { |f|
         File.join(dir, f)
      }

with:

   all_files = stems.map { |f|
      f + "." + guess_extension(f)
   }.as { |t|
      transform2(source_files + transform1(t))
   }.map { |f|
      File.join(dir, f)
   }

The former is so disheveled that I don't even know how to indent it.
On the other hand, the latter is beautiful (to me).

Incidentally I'm all for renaming Object#as to whatever you wish.  I
chose it because it expresses the intent: name the object *as*
something.

--FC