释义 |
- 1
Like filter , map evaluates the string passed as its second argument, passing each list element in turn, via v: val. 和filter一样,map计算作为第二个参数传递的字符串,并且通过v: val传递每个列表元素。 - 2
The call to map walks through each value, aliases it to v: val, evaluates the expression in the string, and replaces the value with the result of that expression. 调用map可以遍历各个值,将其作为别名赋给v: val,在字符串中计算表达式,并用表达式结果替换值。 - 3
The filter function works much the same way as for lists, except that in addition to testing each entry's value using v: val, you can also test its key using v: key. For example. filter函数的工作方法和列表中的相同,除了用v: val来检测各条目的值,您还可以用v: key来检测它的键。
|