Groovy web console

subscribe to the feed Subscribe
to this
site

Foo, moo

Published 2 weeks ago by anon
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def someList = [1,2,3]
def foo = { v = null -> v ? someList[0] = v : someList.first() }
println foo()
foo('moo')
println foo()