AD
Size: a a a
AD
Y
AD
AD
Y
λ
AD
AD
λ
λ
λ
GP
ΛВ
refineV
напрямую.scala> import eu.timepit.refined.api.{ Refined, RefinedTypeOps }
* | import eu.timepit.refined.numeric.Positive
*
* scala> type PosInt = Int Refined Positive
*
* scala> object PosInt extends RefinedTypeOps[PosInt, Int]
*
* scala> PosInt(1)
* res0: PosInt = 1
*
* scala> PosInt.from(2)
* res1: Either[String, PosInt] = Right(2)
ΛВ
λ
refineV
напрямую.scala> import eu.timepit.refined.api.{ Refined, RefinedTypeOps }
* | import eu.timepit.refined.numeric.Positive
*
* scala> type PosInt = Int Refined Positive
*
* scala> object PosInt extends RefinedTypeOps[PosInt, Int]
*
* scala> PosInt(1)
* res0: PosInt = 1
*
* scala> PosInt.from(2)
* res1: Either[String, PosInt] = Right(2)
R
IL
AS
AS
IL