Skip to content

Instantly share code, notes, and snippets.

View pirita's full-sized avatar
📟

Ignacio Navarro Martin pirita

📟
  • Spain
View GitHub Profile
implicit def strToInt(x: String): Int = x.toInt
val y: Int = "123"

Keybase proof

I hereby claim:

  • I am pirita on github.
  • I am pirita (https://keybase.io/pirita) on keybase.
  • I have a public key whose fingerprint is 17C9 A9C7 4D5C 40C1 19D6 BAFD 6E28 EFEB 7543 1274

To claim this, I am signing this object:

@pirita
pirita / Scala
Created February 12, 2014 23:03
Playing with Unicode
object ♁ extends App{
val ☻ = "Hello"
val ❤ = "World"
println(☻ + ❤)
}
sealed abstract class NewEnum(val param1: Int, val param2: Int ,val param1: String)
object NewEnum{
case object en1 extends NewEnum(1, 2, "str1")
case object en2 extends NewEnum(1, 3, "str2")
case object en3 extends NewEnum(1, 4, "str3")
case object en4 extends NewEnum(1, 5, "str4")
def values = Map("en1"->en1, "en2"->en2, "en3"->en3, "en4"->en4)
}