The first line defines a lambda expression and binds it to the symbol total.
第一行代码定义了一个lambda表达式并将其和total符号绑定到一起。
2
The first line is simple: it defines an adapter directly from a string to ILisp, the call to adapt (" foo bar ", ILisp) just returns the results of the lambda function.
第一行比较简单,我们定义了一个直接从字符串到ILisp的适配器,对adapt (“ foo bar ”,ILisp)的调用只是返回了lambda函数的结果。
3
([toStr(e)+'\n' for e in employeeList] uses Jython's list comprehension to turn each result into a line written in slaries.txt with the lambda function toStr.
([toStr(e)+'\n' for e in employeeList]) 通过 Jython 的列表理解,用 lambda 函数 toStr 将每个结果变成 slaries.txt 中的一行。