Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created October 17, 2012 00:48
Show Gist options
  • Save joshcough/3903097 to your computer and use it in GitHub Desktop.
Save joshcough/3903097 to your computer and use it in GitHub Desktop.
sealed trait Value{ val value: Any }
case class Closure[V](l:Lambda, env:Env) extends Value{ val value = this }
case class ObjectValue(value:Any) extends Value
case class DynamicValue(value: () => Value) extends Value
case class BuiltinFunction(name: Symbol, eval: (List[Expr], Env) => Value) extends Value {
val value = this
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment