Using a lambda expression, we can make this more compact.
使用lambda表达式,我们可以把这段代码变得更紧凑一些。
The first line defines a lambda expression and binds it to the symbol total.
第一行代码定义了一个lambda表达式并将其和total符号绑定到一起。
Finally, the last expression applies the lambda expression to the list containing (101 102).
最终,最后一个表达式对包含 (101 102) 的列表应用这个 lambda 表达式。
应用推荐