0

对于 scala 列表,有什么区别

:::

++

来自文档

:::  Adds an element at the beginning of this list.
++  Returns a new list containing the elements from the left hand operand followed by the elements from the right hand operand.
4

1 回答 1

1

::: 连接两个列表,例如。list1 ::: list2

++ 连接任何两个集合,例如。list1 ++ list2. 注意仅在 scala 2.8 中可用。

于 2013-05-07T09:00:44.853 回答