Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

puts

Name: Anonymous 2008-10-24 21:28

PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS PUTS

Name: Anonymous 2008-10-24 21:33

VALID RUBY CODE

Name: Anonymous 2008-10-25 10:55

49.times { PUTS }

Name: Anonymous 2008-10-25 11:28

def* pPUTS = &PUTS;
49.times {
  *pPUTS(pPUTS->toString());   # PUTS "PUTS"
}

Name: Anonymous 2008-10-25 11:48

See, the EXPERT PROGRAMMER that I am, I notice a pattern, and I refactor this pattern:

class Puts
  include Enumerable

  def each n, &block
    n.times do
      block.call
    end
  end
end

e = Puts.new

e.each(49) do
  puts
end

Name: Anonymous 2008-10-25 12:58

See, the EXPERT PROGRAMMER that I am, I notice a pattern, and I refactor this pattern, porting it to another language:


PUTS->puts(49);

package PUTS; use 5.010;
sub puts { bless [[ (shift) x shift ]] , __PACKAGE__ }
sub DESTROY { say for@{shift->[shift]} }

Name: Anonymous 2008-10-25 16:23

PUTS->puts(49); package PUTS; use 5.010;
sub puts { bless [[ (shift) x shift ]] }
sub DESTROY { say for@{shift->[shift]} }

Name: Anonymous 2010-12-21 5:31

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List