Groovy web console

subscribe to the feed Subscribe
to this
site

Closure inside GString

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def x = 1
def s = "x = ${-> x}"
println(s)
x = 2
println(s)