We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
val xs = 1 :: 2 :: 3 :: Nil xs.map(_ * 2)
其中 map 可以用 for 解析替代,两者完全等价:
map
for
for { x ← xs } yield x * 2