Skip to content

Instantly share code, notes, and snippets.

Created December 15, 2010 23:06
What would you like to do?
case class Command (name :String, callsOtherCode :Boolean)
case class Procedure (name :String, commands :List[Command])
case class Activation (procedure :Procedure, parent :Option[Activation], returnAddress :Int) {
def parentCmdName :Option[String] =
parent map(_.procedure.commands(returnAddress)) filter(_.callsOtherCode) map(
def callStack (act :Activation) :List[String] =
List( ++ act.parentCmdName ++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment