
上QQ阅读APP看书,第一时间看更新
Closures
Closures are also referred to as anonymous functions, and this is the best way to explain them. Closures are functions that optionally take a set of input parameters, and they optionally return an output, the same as other functions. However, rather than having a function name, closures behave like other primary types--they can be assigned, stored, passed around, and used as the input and output to functions and other closures.