How Scala cons `::` operator notation works under the hood?

前端 未结 0 1459
无人及你
无人及你 2021-01-06 11:04

How does the following notation works in scala:

1 :: List(2, 3) = List(2, 3).::(1) = List(1, 2, 3)

Is 1 :: List(2, 3) an infix n

相关标签:
回答
  • 消灭零回复
提交回复
热议问题