Groovy web console

subscribe to the feed Subscribe
to this
site
Untitled (via #groovywebconsole)
tweet this snippet Tweet
this
script

Untitled

Published 4 weeks ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
r = 10
f = { x -> x**3 }

isGood = { x -> f(r) > f(x) }

println isGood(9)
println isGood(-5)
println isGood(10)