Android相关

Groovy记录

2018-07-15  本文已影响8人  LeonXtp
官方文档

相关记录

Closures


Closure太重要了,以至于,我要把它单独拎出来。
先看看官方对它的定义:

A closure in Groovy is an open, anonymous, block of code that can take arguments, return a value and be assigned to a variable. A closure may reference variables declared in its surrounding scope. In opposition to the formal definition of a closure, Closure in the Groovy language can also contain free variables which are defined outside of its surrounding scope. While breaking the formal concept of a closure, it offers a variety of advantages which are described in this chapter.

上一篇 下一篇

猜你喜欢

热点阅读