scala-codesheet-api
scala-codesheet-api copied to clipboard
Scala evaluation engine
``` scala import scala.reflect.macros.Context import scala.language.experimental.macros import language.experimental.macros import reflect.macros.Context object DebugMacros { def hello(): Unit = macro hello_impl def hello_impl(c: Context)(): c.Expr[Unit] = { import c.universe._ reify { println("Hello...
from: https://github.com/CodeBrew-io/Issues/issues/6 Manifestation: this expression causes the insight window to go dead. `List[Int]() map (_ :: Nil)` Weirdly, it briefly recovers if that expression is on the very first line...
> Are these hardcoded? If you're not already using scalacheck and Arbitrary/Gen, then you could allow me to create an instance of Arbitrary[List[Int]] and use that... implicits with low priority...
12 match { case 11 => println("hello") } This code is not producing an unmatched exception as I would have expected.
``` scala val a = collection.mutable.Map[String,String]() object A { a("a") = "a" } a ``` ``` scala a = Map(a -> a) A { } //
``` scala def quicksort(a: List[Int] = List(3,4,5,23,1,2,3,4)): List[Int] = { if(a.isEmpty) Nil else { val (big, small) = a.tail.partition(_ > a.head) quicksort(small) ::: (a.head :: quicksort(big)) } } ``` ```...
code ``` scala object A { val a = 2 } ``` insight ``` scala A { a: Int = 2 } ``` or something similar
http://www.scalakata.com/521667dce4b04cc747977806 `Google` evaluate to ``` $md = ; ; Google ```