Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
NodePrinters
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_131).
Type in expressions for evaluation. Or try :help.
scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._
scala> println(nodePrinters.nodeToString(reify { List(1, 2, 3).map(_ * 2) }.tree))
Apply(
Apply(
List.apply(1, 2, 3)."map"
Function(
ValDef(
<param> <synthetic>
"x$1"
<tpt>
<empty>
)
Apply(
"x$1"."$times"
2
)
)
)
"List"."canBuildFrom"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.