【发布时间】:2014-03-05 17:05:08
【问题描述】:
在 Scala 2.9.1 中,我可以做到
> Some(List(1,2,3)).flatten
List(1,2,3)
但在 Scala 2.10.0 中,
> Some(List(1,2,3)).flatten
Cannot prove that Seq[Int] <:< Option[B]
我发现了this 关闭的错误,但我不明白这个结论,或者它为什么被关闭。
(1) 为什么这在 Scala 2.10 中不起作用(显然是设计使然?)
(2) 我的 2.9 代码的惯用 2.10 等效项是什么?
【问题讨论】:
标签: scala monads scala-2.10