Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[info] Compiling 25 Scala sources and 2 Java sources to /Users/sritchie/code/scala/bijection/bijection-core/target/scala-2.9.3/classes...
[warn] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[warn] 1 warning
[info] Starting scala interpreter...
Welcome to Scala version 2.9.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_40).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import com.twitter.bijection.Conversion.asMethod
import com.twitter.bijection.Conversion.asMethod
res0: String = 100
scala> "100".as[Option[Int]]
res1: Option[Int] = Some(100)
res2: com.twitter.bijection.EnglishInt = EnglishInt(one hundred)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment