lib/nydp.rb in nydp-0.4.1 vs lib/nydp.rb in nydp-0.4.2
- old
+ new
@@ -5,15 +5,13 @@
class Namespace < Hash
end
# TODO: write VM #apply_function so we have fewer calls to VM.new
def self.apply_function ns, function_name, *args
- function = r2n(function_name.to_sym, ns).value
- args = r2n args, ns
vm = VM.new(ns)
-
- function.invoke vm, args
+ function = Symbol.mk(function_name.to_sym, ns).value
+ function.invoke vm, r2n(args)
vm.thread
end
def self.reader txt ; Nydp::StringReader.new txt ; end
def self.eval_src ns, src_txt, name=nil ; eval_with Nydp::Runner, ns, src_txt, name ; end
@@ -87,9 +85,10 @@
require "nydp/runner"
require "nydp/error"
require "nydp/truth"
require "nydp/version"
require "nydp/helper"
+require 'nydp/core_ext'
require "nydp/symbol"
require "nydp/symbol_lookup"
require "nydp/pair"
require "nydp/assignment"
require "nydp/builtin"