Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object ImplicitTest extends App {
- implicit def int2string(a: Int): String = a.toString
- def doString(os: Option[String]): String = {
- s"${os.map(_.charAt(0))}"
- }
- println(doString(Some(5)))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement