groovy DSL

show = { println it }
square_root = { Math.sqrt(it) }

def please(action) {
  [the: { what ->
    [of: { n -> action(what(n)) }]
  }]
}
   
please show the square_root of 100
posted @ 2021-07-19 13:16  该显示昵称已被使用了  阅读(24)  评论(0编辑  收藏  举报