跳到正文
本页尚未翻译成中文,以下为英文原文。 查看英文版

values Function ​

values takes a map and returns a list containing the values of the elements in that map.

The values are returned in lexicographical order by their corresponding keys, so the values will be returned in the same order as their keys would be returned from keys.

Examples ​

shellsession
> values({a=3, c=2, d=1})
[
  3,
  2,
  1,
]
  • keys returns a list of the keys from a map.

基于 MPL-2.0 许可证发布。