Groovy web console

subscribe to the feed Subscribe
to this
site

Arithmetic DSL

Published 1 decade ago by Bhagwat Kumar with tags metaprogramming metaClass DSL
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
Number.metaClass.call={expr->
expr? delegate*expr :delegate
}
int x=5
assert 55==5+2(5+x(4))