class Campa::Lisp::Core

{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 {#push} a new {Context} on it.

Constants

CORE_FUNCS_MAP

Public Class Methods

new() click to toggle source
Calls superclass method Campa::Context::new
# File lib/campa/lisp/core.rb, line 14
def initialize
  super Hash[
    CORE_FUNCS_MAP.map { |label, handler| [sym(label), handler.new] }
  ]
end

Private Instance Methods

sym(label) click to toggle source
# File lib/campa/lisp/core.rb, line 40
def sym(label)
  Campa::Symbol.new(label)
end