Phrogz wrote:
> For fun, I thought I'd see what it looked like to implement the
> integer-based algorithm that this quiz is based on. Here's what I came
> up with. (I'm a big fan of monkeypatching. :)

Another monkeypatchingversion (i like reopening classes,
i'm not realy a fan of the term 'monkeypatching')

--------------------------------------------
class String
  def look_and_say
    gsub(/(.)\1*/){|s| "#{s.size}#{s[0,1]}"}
  end
end

s = '1'
12.times {p s; s = s.look_and_say}
--------------------------------------------

cheers

Simon