val*_*rry 3 scala scalaz
我有一个Disjunction具有相同类型的 scalaz ,Disjunction[String, String]我只想获得价值,无论它是什么。因此我使用了myDisjunction.fold(indentity, identity)但我想知道,有没有像这样的快捷方式myDisjunction.safeGetBecauseTypesAreEqual()?
Disjunction
Disjunction[String, String]
myDisjunction.fold(indentity, identity)
myDisjunction.safeGetBecauseTypesAreEqual()
Lee*_*Lee 5
您可以使用merge:
merge
val s: String = myDisjunction.merge()
归档时间:
9 年,5 月 前
查看次数:
190 次
最近记录: