-
-
Save fishmacs/c547035e634ff0b1df30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import scalaz._ | |
import scalaz._ | |
scala> import Scalaz._ | |
import Scalaz._ | |
scala> ∅[Boolean] | |
res0: Boolean = false | |
scala> ∅[Int] | |
res1: Int = 0 | |
scala> ∅[String] | |
res2: String = "" | |
scala> ∅[Seq[Int]] | |
res3: Seq[Int] = Vector() | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
case class Complex(real: Double, imag: Double) | |
object Complex { | |
implicit val Zero = zero(Complex(0.0, 0.0)) | |
} | |
// Exiting paste mode, now interpreting. | |
defined class Complex | |
defined module Complex | |
scala> ∅[Complex] | |
res4: Complex = Complex(0.0,0.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment