Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using Power Mode in the Scala REPL to find the parameter names of a method
scala> :power
** Power User mode enabled - BEEP BOOP **
** has been imported **
** New vals! Try repl, global, power **
** New cmds! :help to discover them **
** New defs! Type power.<tab> to reveal **
scala> val s = repl.stringToCompilerType("scala.Some")
s: repl.compiler.Type = object Some
scala> val applyMethod = s.members.find( == "apply").get
applyMethod: repl.compiler.Symbol = method apply
scala> val param00Name = apply.paramss(0)(0).name
param00Name: repl.compiler.Name = x

This comment has been minimized.

Copy link

@taintech taintech commented Jul 28, 2011

Hello, how to quit from power mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment