我一直在寻找一些关于如何将ArrayBuffera 转换为a的时间Set,HashSet我想这是准确的.任何提示?
I have this:
Set[ValidatedNel[String, Double]]
Run Code Online (Sandbox Code Playgroud)
and I would like to sum the Doubles in it to get:
ValidatedNel[String, Double]
Run Code Online (Sandbox Code Playgroud)
If some elements in the values are then I would like to have matching strings.
I played with Set.sum and Numeric to no avail...
Here is the test of what I would like to achieve:
test("Summing ValidatedNel works") {
val val1: ValidatedNel[String, Double] = Valid(1.0)
val val2: ValidatedNel[String, Double] = Valid(2.0)
val values: Set[ValidatedNel[String, Double]] = Set(val1, val2)
val validatedNelNumeric: Numeric[ValidatedNel[String, …Run Code Online (Sandbox Code Playgroud)