Groovy web console

subscribe to the feed Subscribe
to this
site
Open class (monkey see, monkey patch) (via #groovywebconsole)
tweet this snippet Tweet
this
script

Open class (monkey see, monkey patch)

Published 2 weeks ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
Number.metaClass { 
  sqrt = { Math.sqrt(delegate) }
}
assert 9.sqrt() == 3