| http://www.w3.org/ns/prov#value | - essage) } | }toInt: (string: String)Either[String,Int]scala> toInt(1)res0: Either[String,Int] = Right(1)scala> toInt(booger)res1: Either[String,Int] = Left(Error: For input string: booger)// you can test if the value is a left or right value quite easilyscala> res0.isLeftres2: Boolean = falsescala> res1.isRightres3: Boolean = falsescala> res0.isRightres4: Boolean = truescala> res1.isLeft res
|