Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.util/Either/MergeableEither

MergeableEither

scala.util.Either.MergeableEither
final implicitclassMergeableEither[A](x:Either[A,A]) extendsAnyVal

Allows use of amerge method to extract values from Either instances regardless of whether they are Left or Right.

val l = Left(List(1)): Either[List[Int], Vector[Int]]val r = Right(Vector(1)): Either[List[Int], Vector[Int]]l.merge: Seq[Int] // List(1)r.merge: Seq[Int] // Vector(1)

Attributes

Source
Either.scala
Graph
Supertypes
classAnyVal
traitMatchable
classAny

Members list

Value members

Concrete methods

defmerge:A

Attributes

Source
Either.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp