Class: Campa::Lisp::Core
Overview
Context representing the base for the minimal Lisp stablished by Paul Graham’s: The Roots of Lisp.
Since this is a Context it can be instantiated and use as a parameter to any function invocation that want’s to use Lisp functions on it’s body. And also, it can be used as a fallback so if we want to “extend” Lisp we could Inherit it or Context#push a new Context on it.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ Core
constructor
A new instance of Core.
Methods inherited from Context
#[], #[]=, #bindings, #include?, #push
Constructor Details
#initialize ⇒ Core
Returns a new instance of Core.
14 15 16 17 18 |
# File 'lib/campa/lisp/core.rb', line 14 def initialize super Hash[ CORE_FUNCS_MAP.map { |label, handler| [sym(label), handler.new] } ] end |